| 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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 // An init helper that runs on the IO thread. | 358 // An init helper that runs on the IO thread. |
| 359 void OnInit(); | 359 void OnInit(); |
| 360 | 360 |
| 361 // A shutdown helper that runs on the IO thread. | 361 // A shutdown helper that runs on the IO thread. |
| 362 void OnShutdown(); | 362 void OnShutdown(); |
| 363 | 363 |
| 364 void OnRenderFrameDeleted(const GlobalFrameRoutingId& global_routing_id); | 364 void OnRenderFrameDeleted(const GlobalFrameRoutingId& global_routing_id); |
| 365 | 365 |
| 366 // Helper function for regular and download requests. | 366 // Helper function for regular and download requests. |
| 367 void BeginRequestInternal(scoped_ptr<net::URLRequest> request, | 367 void BeginRequestInternal(scoped_ptr<net::URLRequest> request, |
| 368 scoped_ptr<ResourceHandler> handler); | 368 scoped_ptr<ResourceHandler> handler, |
| 369 ResourceContext* resource_context); |
| 369 | 370 |
| 370 void StartLoading(ResourceRequestInfoImpl* info, | 371 void StartLoading(ResourceRequestInfoImpl* info, |
| 371 scoped_ptr<ResourceLoader> loader); | 372 scoped_ptr<ResourceLoader> loader); |
| 372 | 373 |
| 373 // We keep track of how much memory each request needs and how many requests | 374 // We keep track of how much memory each request needs and how many requests |
| 374 // are issued by each renderer. These are known as OustandingRequestStats. | 375 // are issued by each renderer. These are known as OustandingRequestStats. |
| 375 // Memory limits apply to all requests sent to us by the renderers. There is a | 376 // Memory limits apply to all requests sent to us by the renderers. There is a |
| 376 // limit for each renderer. File descriptor limits apply to requests that are | 377 // limit for each renderer. File descriptor limits apply to requests that are |
| 377 // receiving their body. These are known as in-flight requests. There is a | 378 // receiving their body. These are known as in-flight requests. There is a |
| 378 // global limit that applies for the browser process. Each render is allowed | 379 // global limit that applies for the browser process. Each render is allowed |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 641 DelegateMap delegate_map_; | 642 DelegateMap delegate_map_; |
| 642 | 643 |
| 643 scoped_ptr<ResourceScheduler> scheduler_; | 644 scoped_ptr<ResourceScheduler> scheduler_; |
| 644 | 645 |
| 645 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); | 646 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); |
| 646 }; | 647 }; |
| 647 | 648 |
| 648 } // namespace content | 649 } // namespace content |
| 649 | 650 |
| 650 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 651 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
| OLD | NEW |