| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 | 62 |
| 63 namespace content { | 63 namespace content { |
| 64 class AppCacheService; | 64 class AppCacheService; |
| 65 class AsyncRevalidationManager; | 65 class AsyncRevalidationManager; |
| 66 class CertStore; | 66 class CertStore; |
| 67 class FrameTree; | 67 class FrameTree; |
| 68 class NavigationURLLoaderImplCore; | 68 class NavigationURLLoaderImplCore; |
| 69 class RenderFrameHostImpl; | 69 class RenderFrameHostImpl; |
| 70 class ResourceContext; | 70 class ResourceContext; |
| 71 class ResourceDispatcherHostDelegate; | 71 class ResourceDispatcherHostDelegate; |
| 72 class ResourceHintsController; |
| 72 class ResourceMessageDelegate; | 73 class ResourceMessageDelegate; |
| 73 class ResourceMessageFilter; | 74 class ResourceMessageFilter; |
| 74 class ResourceRequestInfoImpl; | 75 class ResourceRequestInfoImpl; |
| 75 class SaveFileManager; | 76 class SaveFileManager; |
| 76 class ServiceWorkerNavigationHandleCore; | 77 class ServiceWorkerNavigationHandleCore; |
| 77 class WebContentsImpl; | 78 class WebContentsImpl; |
| 78 struct CommonNavigationParams; | 79 struct CommonNavigationParams; |
| 79 struct DownloadSaveInfo; | 80 struct DownloadSaveInfo; |
| 80 struct NavigationRequestInfo; | 81 struct NavigationRequestInfo; |
| 81 struct Referrer; | 82 struct Referrer; |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 void BeginNavigationRequest( | 312 void BeginNavigationRequest( |
| 312 ResourceContext* resource_context, | 313 ResourceContext* resource_context, |
| 313 const NavigationRequestInfo& info, | 314 const NavigationRequestInfo& info, |
| 314 NavigationURLLoaderImplCore* loader, | 315 NavigationURLLoaderImplCore* loader, |
| 315 ServiceWorkerNavigationHandleCore* service_worker_handle_core); | 316 ServiceWorkerNavigationHandleCore* service_worker_handle_core); |
| 316 | 317 |
| 317 // Turns on stale-while-revalidate support, regardless of command-line flags | 318 // Turns on stale-while-revalidate support, regardless of command-line flags |
| 318 // or experiment status. For unit tests only. | 319 // or experiment status. For unit tests only. |
| 319 void EnableStaleWhileRevalidateForTesting(); | 320 void EnableStaleWhileRevalidateForTesting(); |
| 320 | 321 |
| 322 ResourceHintsController* resource_hints_controller() { |
| 323 return resource_hints_controller_.get(); |
| 324 } |
| 325 |
| 321 private: | 326 private: |
| 322 friend class LoaderIOThreadNotifier; | 327 friend class LoaderIOThreadNotifier; |
| 323 friend class ResourceDispatcherHostTest; | 328 friend class ResourceDispatcherHostTest; |
| 324 | 329 |
| 325 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 330 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
| 326 TestBlockedRequestsProcessDies); | 331 TestBlockedRequestsProcessDies); |
| 327 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 332 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
| 328 CalculateApproximateMemoryCost); | 333 CalculateApproximateMemoryCost); |
| 329 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 334 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
| 330 DetachableResourceTimesOut); | 335 DetachableResourceTimesOut); |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 652 // http://crbug.com/90971 - Assists in tracking down use-after-frees on | 657 // http://crbug.com/90971 - Assists in tracking down use-after-frees on |
| 653 // shutdown. | 658 // shutdown. |
| 654 std::set<const ResourceContext*> active_resource_contexts_; | 659 std::set<const ResourceContext*> active_resource_contexts_; |
| 655 | 660 |
| 656 typedef std::map<GlobalRequestID, | 661 typedef std::map<GlobalRequestID, |
| 657 base::ObserverList<ResourceMessageDelegate>*> DelegateMap; | 662 base::ObserverList<ResourceMessageDelegate>*> DelegateMap; |
| 658 DelegateMap delegate_map_; | 663 DelegateMap delegate_map_; |
| 659 | 664 |
| 660 std::unique_ptr<ResourceScheduler> scheduler_; | 665 std::unique_ptr<ResourceScheduler> scheduler_; |
| 661 | 666 |
| 667 std::unique_ptr<ResourceHintsController> resource_hints_controller_; |
| 668 |
| 662 // Allows tests to use a mock CertStore. If set, the CertStore must | 669 // Allows tests to use a mock CertStore. If set, the CertStore must |
| 663 // outlive this ResourceDispatcherHostImpl. | 670 // outlive this ResourceDispatcherHostImpl. |
| 664 CertStore* cert_store_for_testing_; | 671 CertStore* cert_store_for_testing_; |
| 665 | 672 |
| 666 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); | 673 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); |
| 667 }; | 674 }; |
| 668 | 675 |
| 669 } // namespace content | 676 } // namespace content |
| 670 | 677 |
| 671 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 678 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
| OLD | NEW |