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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 // |id| should be |DownloadId()| (null) to request automatic | 212 // |id| should be |DownloadId()| (null) to request automatic |
213 // assignment. | 213 // assignment. |
214 scoped_ptr<ResourceHandler> CreateResourceHandlerForDownload( | 214 scoped_ptr<ResourceHandler> CreateResourceHandlerForDownload( |
215 net::URLRequest* request, | 215 net::URLRequest* request, |
216 bool is_content_initiated, | 216 bool is_content_initiated, |
217 bool must_download, | 217 bool must_download, |
218 DownloadId id, | 218 DownloadId id, |
219 scoped_ptr<DownloadSaveInfo> save_info, | 219 scoped_ptr<DownloadSaveInfo> save_info, |
220 const DownloadResourceHandler::OnStartedCallback& started_cb); | 220 const DownloadResourceHandler::OnStartedCallback& started_cb); |
221 | 221 |
| 222 // Must be called after the ResourceRequestInfo has been created |
| 223 // and associated with the request. |
| 224 scoped_ptr<ResourceHandler> MaybeInterceptAsStream( |
| 225 net::URLRequest* request, |
| 226 ResourceResponse* response); |
| 227 |
222 void ClearSSLClientAuthHandlerForRequest(net::URLRequest* request); | 228 void ClearSSLClientAuthHandlerForRequest(net::URLRequest* request); |
223 | 229 |
224 ResourceScheduler* scheduler() { return scheduler_.get(); } | 230 ResourceScheduler* scheduler() { return scheduler_.get(); } |
225 | 231 |
226 private: | 232 private: |
227 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 233 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
228 TestBlockedRequestsProcessDies); | 234 TestBlockedRequestsProcessDies); |
229 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 235 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
230 IncrementOutstandingRequestsMemoryCost); | 236 IncrementOutstandingRequestsMemoryCost); |
231 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 237 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 scoped_ptr<ResourceScheduler> scheduler_; | 451 scoped_ptr<ResourceScheduler> scheduler_; |
446 | 452 |
447 RenderViewHostTracker tracker_; // Lives on UI thread. | 453 RenderViewHostTracker tracker_; // Lives on UI thread. |
448 | 454 |
449 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); | 455 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); |
450 }; | 456 }; |
451 | 457 |
452 } // namespace content | 458 } // namespace content |
453 | 459 |
454 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 460 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
OLD | NEW |