| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This is the browser side of the resource dispatcher, it receives requests | 5 // This is the browser side of the resource dispatcher, it receives requests |
| 6 // from the child process (i.e. [Renderer, Plugin, Worker]ProcessHost), and | 6 // from the child process (i.e. [Renderer, Plugin, Worker]ProcessHost), and |
| 7 // dispatches them to URLRequests. It then fowards the messages from the | 7 // dispatches them to URLRequests. It then fowards the messages from the |
| 8 // URLRequests back to the correct process for handling. | 8 // URLRequests back to the correct process for handling. |
| 9 // | 9 // |
| 10 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading | 10 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 int child_id; | 98 int child_id; |
| 99 int request_id; | 99 int request_id; |
| 100 | 100 |
| 101 bool operator<(const GlobalRequestID& other) const { | 101 bool operator<(const GlobalRequestID& other) const { |
| 102 if (child_id == other.child_id) | 102 if (child_id == other.child_id) |
| 103 return request_id < other.request_id; | 103 return request_id < other.request_id; |
| 104 return child_id < other.child_id; | 104 return child_id < other.child_id; |
| 105 } | 105 } |
| 106 }; | 106 }; |
| 107 | 107 |
| 108 // TODO(jam): take the parameter out once 25354 is done. |
| 108 explicit ResourceDispatcherHost(MessageLoop* io_loop); | 109 explicit ResourceDispatcherHost(MessageLoop* io_loop); |
| 109 ~ResourceDispatcherHost(); | 110 ~ResourceDispatcherHost(); |
| 110 | 111 |
| 111 void Initialize(); | 112 void Initialize(); |
| 112 | 113 |
| 113 // Puts the resource dispatcher host in an inactive state (unable to begin | 114 // Puts the resource dispatcher host in an inactive state (unable to begin |
| 114 // new requests). Cancels all pending requests. | 115 // new requests). Cancels all pending requests. |
| 115 void Shutdown(); | 116 void Shutdown(); |
| 116 | 117 |
| 117 // Returns true if the message was a resource message that was processed. | 118 // Returns true if the message was a resource message that was processed. |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 | 481 |
| 481 // Keeps track of elements blocked by the Privacy Blacklist. | 482 // Keeps track of elements blocked by the Privacy Blacklist. |
| 482 chrome::BlockedResponse blocked_; | 483 chrome::BlockedResponse blocked_; |
| 483 | 484 |
| 484 static bool g_is_http_prioritization_enabled; | 485 static bool g_is_http_prioritization_enabled; |
| 485 | 486 |
| 486 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost); | 487 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost); |
| 487 }; | 488 }; |
| 488 | 489 |
| 489 #endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ | 490 #endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ |
| OLD | NEW |