OLD | NEW |
1 # Life of a URLRequest | 1 # Life of a URLRequest |
2 | 2 |
3 This document is intended as an overview of the core layers of the network | 3 This document is intended as an overview of the core layers of the network |
4 stack, their basic responsibilities, how they fit together, and where some of | 4 stack, their basic responsibilities, how they fit together, and where some of |
5 the pain points are, without going into too much detail. Though it touches a | 5 the pain points are, without going into too much detail. Though it touches a |
6 bit on child processes and the content/loader stack, the focus is on net/ | 6 bit on child processes and the content/loader stack, the focus is on net/ |
7 itself. | 7 itself. |
8 | 8 |
9 It's particularly targeted at people new to the Chrome network stack, but | 9 It's particularly targeted at people new to the Chrome network stack, but |
10 should also be useful for team members who may be experts at some parts of the | 10 should also be useful for team members who may be experts at some parts of the |
11 stack, but are largely unfamiliar with other components. It starts by walking | 11 stack, but are largely unfamiliar with other components. It starts by walking |
12 through how a basic request issued by another process works its way through the | 12 through how a basic request issued by another process works its way through the |
13 network stack, and then moves on to discuss how various components plug in. | 13 network stack, and then moves on to discuss how various components plug in. |
14 | 14 |
15 If you notice any inaccuracies in this document, or feel that things could be | 15 If you notice any inaccuracies in this document, or feel that things could be |
16 better explained, please do not hesitate to submit patches. | 16 better explained, please do not hesitate to submit patches. |
17 | 17 |
18 # Anatomy of the Network Stack | 18 # Anatomy of the Network Stack |
19 | 19 |
20 The top-level network stack object is the URLRequextContext. The context has | 20 The top-level network stack object is the URLRequestContext. The context has |
21 non-owning pointers to everything needed to create and issue a URLRequest. The | 21 non-owning pointers to everything needed to create and issue a URLRequest. The |
22 context must outlive all requests that use it. Creating a context is a rather | 22 context must outlive all requests that use it. Creating a context is a rather |
23 complicated process, and it's recommended that most consumers use | 23 complicated process, and it's recommended that most consumers use |
24 URLRequestContextBuilder to do this. | 24 URLRequestContextBuilder to do this. |
25 | 25 |
26 Chrome has a number of different URLRequestContexts, as there is often a need to | 26 Chrome has a number of different URLRequestContexts, as there is often a need to |
27 keep cookies, caches, and socket pools separate for different types of requests. | 27 keep cookies, caches, and socket pools separate for different types of requests. |
28 Here are the ones that the network team owns: | 28 Here are the ones that the network team owns: |
29 | 29 |
30 * The proxy URLRequestContext, owned by the IOThread and used to get PAC | 30 * The proxy URLRequestContext, owned by the IOThread and used to get PAC |
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
503 connection is established, the first usable connection goes to the highest | 503 connection is established, the first usable connection goes to the highest |
504 priority socket request. | 504 priority socket request. |
505 | 505 |
506 ## Non-HTTP Schemes | 506 ## Non-HTTP Schemes |
507 | 507 |
508 The URLRequestJobFactory has a ProtocolHander for each supported scheme. | 508 The URLRequestJobFactory has a ProtocolHander for each supported scheme. |
509 Non-HTTP URLRequests have their own ProtocolHandlers. Some are implemented in | 509 Non-HTTP URLRequests have their own ProtocolHandlers. Some are implemented in |
510 net/, (like FTP, file, and data, though the renderer handles some data URLs | 510 net/, (like FTP, file, and data, though the renderer handles some data URLs |
511 internally), and others are implemented in content/ or chrome (like blob, | 511 internally), and others are implemented in content/ or chrome (like blob, |
512 chrome, and chrome-extension). | 512 chrome, and chrome-extension). |
OLD | NEW |