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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 // Called by a ResourceHandler after it has finished its request and is done | 231 // Called by a ResourceHandler after it has finished its request and is done |
232 // using its shared memory buffer. Frees up that file descriptor to be used | 232 // using its shared memory buffer. Frees up that file descriptor to be used |
233 // elsewhere. | 233 // elsewhere. |
234 void FinishedWithResourcesForRequest(const net::URLRequest* request_); | 234 void FinishedWithResourcesForRequest(const net::URLRequest* request_); |
235 | 235 |
236 private: | 236 private: |
237 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 237 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
238 TestBlockedRequestsProcessDies); | 238 TestBlockedRequestsProcessDies); |
239 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 239 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
240 CalculateApproximateMemoryCost); | 240 CalculateApproximateMemoryCost); |
| 241 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
| 242 DetachableResourceTimesOut); |
| 243 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
| 244 TestProcessCancelDetachableTimesOut); |
241 | 245 |
242 class ShutdownTask; | 246 class ShutdownTask; |
243 | 247 |
244 struct OustandingRequestsStats { | 248 struct OustandingRequestsStats { |
245 int memory_cost; | 249 int memory_cost; |
246 int num_requests; | 250 int num_requests; |
247 }; | 251 }; |
248 | 252 |
249 friend class ShutdownTask; | 253 friend class ShutdownTask; |
250 friend class ResourceMessageDelegate; | 254 friend class ResourceMessageDelegate; |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 typedef std::map<GlobalRoutingID, OfflinePolicy*> OfflineMap; | 509 typedef std::map<GlobalRoutingID, OfflinePolicy*> OfflineMap; |
506 | 510 |
507 OfflineMap offline_policy_map_; | 511 OfflineMap offline_policy_map_; |
508 | 512 |
509 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); | 513 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); |
510 }; | 514 }; |
511 | 515 |
512 } // namespace content | 516 } // namespace content |
513 | 517 |
514 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 518 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
OLD | NEW |