| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 class FilePath; | 47 class FilePath; |
| 48 class RepeatingTimer; | 48 class RepeatingTimer; |
| 49 } | 49 } |
| 50 | 50 |
| 51 namespace net { | 51 namespace net { |
| 52 class URLRequest; | 52 class URLRequest; |
| 53 class HttpRequestHeaders; | 53 class HttpRequestHeaders; |
| 54 } | 54 } |
| 55 | 55 |
| 56 namespace storage { | 56 namespace storage { |
| 57 class BlobStorageContext; |
| 57 class FileSystemContext; | 58 class FileSystemContext; |
| 58 class ShareableFileReference; | 59 class ShareableFileReference; |
| 59 } | 60 } |
| 60 | 61 |
| 61 namespace content { | 62 namespace content { |
| 62 class AppCacheNavigationHandleCore; | 63 class AppCacheNavigationHandleCore; |
| 63 class AppCacheService; | 64 class AppCacheService; |
| 64 class LoaderDelegate; | 65 class LoaderDelegate; |
| 65 class NavigationURLLoaderImplCore; | 66 class NavigationURLLoaderImplCore; |
| 66 class NavigationUIData; | 67 class NavigationUIData; |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 564 int route_id, | 565 int route_id, |
| 565 mojom::URLLoaderRequest mojo_request, | 566 mojom::URLLoaderRequest mojo_request, |
| 566 mojom::URLLoaderClientPtr url_loader_client); | 567 mojom::URLLoaderClientPtr url_loader_client); |
| 567 | 568 |
| 568 // There are requests which need decisions to be made like the following: | 569 // There are requests which need decisions to be made like the following: |
| 569 // Whether the presence of certain HTTP headers like the Origin header are | 570 // Whether the presence of certain HTTP headers like the Origin header are |
| 570 // valid, etc. These requests may need to be aborted based on these | 571 // valid, etc. These requests may need to be aborted based on these |
| 571 // decisions which could be time consuming. We allow for these decisions | 572 // decisions which could be time consuming. We allow for these decisions |
| 572 // to be made asynchronously. The request proceeds when we hear back from | 573 // to be made asynchronously. The request proceeds when we hear back from |
| 573 // the interceptors about whether to continue or not. | 574 // the interceptors about whether to continue or not. |
| 575 // The |blob_context| is always null if this is a navigation a stream request. |
| 574 // The |interceptor_result| indicates whether the request should be continued | 576 // The |interceptor_result| indicates whether the request should be continued |
| 575 // or aborted, and in the latter case whether the renderer should be killed. | 577 // or aborted, and in the latter case whether the renderer should be killed. |
| 576 void ContinuePendingBeginRequest( | 578 void ContinuePendingBeginRequest( |
| 577 scoped_refptr<ResourceRequesterInfo> requester_info, | 579 scoped_refptr<ResourceRequesterInfo> requester_info, |
| 578 int request_id, | 580 int request_id, |
| 579 const ResourceRequest& request_data, | 581 const ResourceRequest& request_data, |
| 580 const SyncLoadResultCallback& sync_result_handler, // only valid for sync | 582 const SyncLoadResultCallback& sync_result_handler, // only valid for sync |
| 581 int route_id, | 583 int route_id, |
| 582 const net::HttpRequestHeaders& headers, | 584 const net::HttpRequestHeaders& headers, |
| 583 mojom::URLLoaderRequest mojo_request, | 585 mojom::URLLoaderRequest mojo_request, |
| 584 mojom::URLLoaderClientPtr url_loader_client, | 586 mojom::URLLoaderClientPtr url_loader_client, |
| 587 storage::BlobStorageContext* blob_context, |
| 585 HeaderInterceptorResult interceptor_result); | 588 HeaderInterceptorResult interceptor_result); |
| 586 | 589 |
| 587 // Creates a ResourceHandler to be used by BeginRequest() for normal resource | 590 // Creates a ResourceHandler to be used by BeginRequest() for normal resource |
| 588 // loading. | 591 // loading. |
| 589 std::unique_ptr<ResourceHandler> CreateResourceHandler( | 592 std::unique_ptr<ResourceHandler> CreateResourceHandler( |
| 590 ResourceRequesterInfo* requester_info, | 593 ResourceRequesterInfo* requester_info, |
| 591 net::URLRequest* request, | 594 net::URLRequest* request, |
| 592 const ResourceRequest& request_data, | 595 const ResourceRequest& request_data, |
| 593 const SyncLoadResultCallback& sync_result_handler, | 596 const SyncLoadResultCallback& sync_result_handler, |
| 594 int route_id, | 597 int route_id, |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 791 | 794 |
| 792 // Task runner for the IO thead. | 795 // Task runner for the IO thead. |
| 793 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner_; | 796 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner_; |
| 794 | 797 |
| 795 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); | 798 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); |
| 796 }; | 799 }; |
| 797 | 800 |
| 798 } // namespace content | 801 } // namespace content |
| 799 | 802 |
| 800 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 803 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
| OLD | NEW |