OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 forwards the messages from the | 7 // dispatches them to URLRequests. It then forwards 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 ResourceContext* context); | 125 ResourceContext* context); |
126 | 126 |
127 // Cancels the given request if it still exists. We ignore cancels from the | 127 // Cancels the given request if it still exists. We ignore cancels from the |
128 // renderer in the event of a download. | 128 // renderer in the event of a download. |
129 void CancelRequest(int child_id, | 129 void CancelRequest(int child_id, |
130 int request_id, | 130 int request_id, |
131 bool from_renderer); | 131 bool from_renderer); |
132 | 132 |
133 // Marks the request as "parked". This happens if a request is | 133 // Marks the request as "parked". This happens if a request is |
134 // redirected cross-site and needs to be resumed by a new render view. | 134 // redirected cross-site and needs to be resumed by a new render view. |
135 void MarkAsTransferredNavigation(const GlobalRequestID& id); | 135 void MarkAsTransferredNavigation(const GlobalRequestID& id, |
| 136 const GURL& target_url); |
136 | 137 |
137 // Resumes the request without transferring it to a new render view. | 138 // Resumes the request without transferring it to a new render view. |
138 void ResumeDeferredNavigation(const GlobalRequestID& id); | 139 void ResumeDeferredNavigation(const GlobalRequestID& id); |
139 | 140 |
140 // Returns the number of pending requests. This is designed for the unittests | 141 // Returns the number of pending requests. This is designed for the unittests |
141 int pending_requests() const { | 142 int pending_requests() const { |
142 return static_cast<int>(pending_loaders_.size()); | 143 return static_cast<int>(pending_loaders_.size()); |
143 } | 144 } |
144 | 145 |
145 // Intended for unit-tests only. Overrides the outstanding requests bound. | 146 // Intended for unit-tests only. Overrides the outstanding requests bound. |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 typedef std::map<GlobalRoutingID, OfflinePolicy*> OfflineMap; | 506 typedef std::map<GlobalRoutingID, OfflinePolicy*> OfflineMap; |
506 | 507 |
507 OfflineMap offline_policy_map_; | 508 OfflineMap offline_policy_map_; |
508 | 509 |
509 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); | 510 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); |
510 }; | 511 }; |
511 | 512 |
512 } // namespace content | 513 } // namespace content |
513 | 514 |
514 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 515 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
OLD | NEW |