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