forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include class relationship diagrams in network stack documentation.
This CL includes class relationship diagrams for most of the classes mentioned in life_of_a_url_request.md and a sketch of the object relationships inside socket pools. It also removes the net_docs target (which wasn't really being used) and adds information for debugging markdown changes and updating SVG files from dot source. BUG=None R=eroman@chromium.org R=mmenke@chromium.org Committed: https://crrev.com/fb2fd16bec430431971d14658ef3800b23f0ab3f Cr-Commit-Position: refs/heads/master@{#385934} Review URL: https://codereview.chromium.org/1859793002 Cr-Commit-Position: refs/heads/master@{#386113}
- Loading branch information
Showing
9 changed files
with
1,281 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
To generate the output HTML from an input markdown file on Unix | ||
machines, execute the command: | ||
|
||
PYTHONPATH=../../third_party python -m markdown -f <output>.html <input>.md | ||
|
||
On Windows machines, execute: | ||
|
||
set PYTHONPATH=..\..\third_party | ||
python -m markdown -f <output>.html <input>.md | ||
|
||
(This command line assumes that the net/docs directory is the current | ||
directory; if that's not the case, adjust the path to src/third_party | ||
to be accurate from whatever directory the command is executed from.) | ||
|
||
The diagrams included in the network stack documentation were | ||
generated with Graphviz, and both source (.dot) and output (.svg) are | ||
included in the repository. If graphviz is installed, the output may | ||
be regenerated from the source via: | ||
|
||
dot dot -Tsvg <name>.dot > <name>.svg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
digraph SocketPools { | ||
subgraph cluster_legend { | ||
label="Legend"; | ||
|
||
## The following legend is an attempt to match UML notation, | ||
## except for template_class and Factory->object, which are | ||
## invented for this diagram. | ||
BaseClass; | ||
SubClass [label="Derived Class"]; | ||
Whole; | ||
Part; | ||
A; | ||
B; | ||
Interface [label="Interface / ABC", style=dashed]; | ||
template_class [shape=diamond]; # Link will name parameter(s) | ||
|
||
SubClass -> BaseClass [arrowhead="empty"]; | ||
SubClass -> Interface [arrowhead="empty", style=dashed]; | ||
Part -> Whole [arrowhead="diamond", label="ownership"]; | ||
Part -> Whole [arrowhead="odiamond", label="pointer"]; | ||
RefCountedPart -> Whole [arrowhead="diamond", color=red, | ||
label="partial\nownership"]; | ||
A -> B [arrowhead="none", headlabel="?..?", taillabel="?..?", | ||
label="association"]; | ||
// Often a "subgraph { rank=same; .. }" is used to wrap the | ||
// below to make the generative relationship distinctive | ||
// from the other class relationships. | ||
Factory -> object [arrowhead=veevee]; | ||
}; | ||
|
||
ClientSocketPoolBase [shape=diamond]; | ||
ClientSocketPoolBaseHelper; | ||
|
||
ClientSocketPoolBaseHelper_ConnectJobFactory | ||
[style=dotted, label="ClientSocketPoolBaseHelper::\nConnectJobFactory"]; | ||
ClientSocketPoolBase_ConnectJobFactory | ||
[style=dotted, shape=diamond, | ||
label="ClientSocketPoolBase::\nConnectJobFactory"]; | ||
ClientSocketPoolBase_ConnectJobFactoryAdaptor | ||
[shape=diamond, | ||
label="ClientSocketPoolBase::\nConnectJobFactoryAdaptor"]; | ||
|
||
HigherLayeredPool [style=dotted]; | ||
LowerLayeredPool [style=dotted]; | ||
ClientSocketPool [style=dotted]; | ||
|
||
ConnectJob [style=dashed]; | ||
ConnectJob_Delegate [style=dotted, label="ConnectJob::Delegate"]; | ||
|
||
ClientSocketFactory [style=dotted]; | ||
DefaultClientSocketFactory; | ||
TCPClientSocket; | ||
StreamSocket [style=dotted] | ||
Socket; | ||
|
||
TransportSocketParams; | ||
TransportConnectJobHelper; | ||
TransportConnectJobFactory; | ||
TransportConnectJob; | ||
|
||
TransportClientSocketPool -> ClientSocketPool [arrowhead=empty]; | ||
ClientSocketPool -> LowerLayeredPool [arrowhead=empty]; | ||
ClientSocketPoolBaseHelper -> ConnectJob_Delegate [arrowhead=empty]; | ||
TransportConnectJobFactory -> ClientSocketPoolBase_ConnectJobFactory | ||
[arrowhead=empty, label="TransportSocketParams"]; | ||
ClientSocketPoolBase_ConnectJobFactoryAdaptor -> | ||
ClientSocketPoolBaseHelper_ConnectJobFactory | ||
[arrowhead=empty, arrowtail=none]; | ||
TransportConnectJob -> ConnectJob [arrowhead=empty]; | ||
DefaultClientSocketFactory -> ClientSocketFactory [arrowhead=empty]; | ||
StreamSocket -> Socket [arrowhead=empty] | ||
TCPClientSocket -> StreamSocket [arrowhead=empty] | ||
|
||
ClientSocketPoolBaseHelper -> ClientSocketPoolBase [arrowhead=diamond]; | ||
ClientSocketPoolBase -> TransportClientSocketPool | ||
[arrowhead=diamond, label="TransportSocketParams"]; | ||
ClientSocketPoolBase_ConnectJobFactory -> | ||
ClientSocketPoolBase_ConnectJobFactoryAdaptor [arrowhead=diamond]; | ||
ClientSocketPoolBaseHelper_ConnectJobFactory -> | ||
ClientSocketPoolBaseHelper [arrowhead=diamond]; | ||
TransportConnectJobHelper -> TransportConnectJob [arrowhead=diamond]; | ||
TransportSocketParams -> TransportConnectJobHelper | ||
[arrowhead=diamond, color=red]; | ||
|
||
ConnectJob -> ConnectJob_Delegate | ||
[dir=back, arrowhead=none, arrowtail=odiamond]; | ||
HigherLayeredPool -> ClientSocketPoolBaseHelper | ||
[arrowhead=odiamond, taillabel="*"]; | ||
LowerLayeredPool -> ClientSocketPoolBaseHelper | ||
[arrowhead=odiamond, taillabel="*"]; | ||
ClientSocketFactory -> ClientSocketPoolBaseHelper [arrowhead=odiamond]; | ||
|
||
subgraph { | ||
rank=same; | ||
ClientSocketPoolBaseHelper_ConnectJobFactory -> ConnectJob | ||
[arrowhead=veevee]; | ||
} | ||
ClientSocketPoolBase_ConnectJobFactory -> ConnectJob [arrowhead=veevee]; | ||
ClientSocketFactory -> TCPClientSocket [arrowhead=veevee] | ||
} | ||
|
Oops, something went wrong.