| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 // hasn't been created yet. | 101 // hasn't been created yet. |
| 102 static ResourceDispatcherHostImpl* Get(); | 102 static ResourceDispatcherHostImpl* Get(); |
| 103 | 103 |
| 104 // ResourceDispatcherHost implementation: | 104 // ResourceDispatcherHost implementation: |
| 105 void SetDelegate(ResourceDispatcherHostDelegate* delegate) override; | 105 void SetDelegate(ResourceDispatcherHostDelegate* delegate) override; |
| 106 void SetAllowCrossOriginAuthPrompt(bool value) override; | 106 void SetAllowCrossOriginAuthPrompt(bool value) override; |
| 107 void ClearLoginDelegateForRequest(net::URLRequest* request) override; | 107 void ClearLoginDelegateForRequest(net::URLRequest* request) override; |
| 108 void RegisterInterceptor(const std::string& http_header, | 108 void RegisterInterceptor(const std::string& http_header, |
| 109 const std::string& starts_with, | 109 const std::string& starts_with, |
| 110 const InterceptorCallback& interceptor) override; | 110 const InterceptorCallback& interceptor) override; |
| 111 void ReprioritizeRequest(net::URLRequest* request, |
| 112 net::RequestPriority priority) override; |
| 111 | 113 |
| 112 // Puts the resource dispatcher host in an inactive state (unable to begin | 114 // Puts the resource dispatcher host in an inactive state (unable to begin |
| 113 // new requests). Cancels all pending requests. | 115 // new requests). Cancels all pending requests. |
| 114 void Shutdown(); | 116 void Shutdown(); |
| 115 | 117 |
| 116 // Force cancels any pending requests for the given |context|. This is | 118 // Force cancels any pending requests for the given |context|. This is |
| 117 // necessary to ensure that before |context| goes away, all requests | 119 // necessary to ensure that before |context| goes away, all requests |
| 118 // for it are dead. | 120 // for it are dead. |
| 119 void CancelRequestsForContext(ResourceContext* context); | 121 void CancelRequestsForContext(ResourceContext* context); |
| 120 | 122 |
| (...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 772 | 774 |
| 773 // Task runner for the IO thead. | 775 // Task runner for the IO thead. |
| 774 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner_; | 776 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner_; |
| 775 | 777 |
| 776 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); | 778 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); |
| 777 }; | 779 }; |
| 778 | 780 |
| 779 } // namespace content | 781 } // namespace content |
| 780 | 782 |
| 781 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 783 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
| OLD | NEW |