| 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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 bool is_content_initiated, | 340 bool is_content_initiated, |
| 341 bool do_not_prompt_for_login, | 341 bool do_not_prompt_for_login, |
| 342 ResourceContext* context); | 342 ResourceContext* context); |
| 343 | 343 |
| 344 bool is_shutdown() const { return is_shutdown_; } | 344 bool is_shutdown() const { return is_shutdown_; } |
| 345 | 345 |
| 346 // Creates a new request ID for browser initiated requests. See the comments | 346 // Creates a new request ID for browser initiated requests. See the comments |
| 347 // of |request_id_| for the details. Must be called on the IO thread. | 347 // of |request_id_| for the details. Must be called on the IO thread. |
| 348 int MakeRequestID(); | 348 int MakeRequestID(); |
| 349 | 349 |
| 350 // Cancels a request as requested by a renderer. |
| 351 // Note that this cancel is subtly different from the other CancelRequest |
| 352 // methods in this file, which also tear down the loader. |
| 353 void CancelRequestFromRenderer(GlobalRequestID request_id); |
| 354 |
| 350 private: | 355 private: |
| 351 friend class ResourceDispatcherHostTest; | 356 friend class ResourceDispatcherHostTest; |
| 352 | 357 |
| 353 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 358 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
| 354 TestBlockedRequestsProcessDies); | 359 TestBlockedRequestsProcessDies); |
| 355 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 360 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
| 356 CalculateApproximateMemoryCost); | 361 CalculateApproximateMemoryCost); |
| 357 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 362 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
| 358 DetachableResourceTimesOut); | 363 DetachableResourceTimesOut); |
| 359 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 364 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 773 | 778 |
| 774 // Points to the registered download handler intercept. | 779 // Points to the registered download handler intercept. |
| 775 CreateDownloadHandlerIntercept create_download_handler_intercept_; | 780 CreateDownloadHandlerIntercept create_download_handler_intercept_; |
| 776 | 781 |
| 777 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); | 782 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); |
| 778 }; | 783 }; |
| 779 | 784 |
| 780 } // namespace content | 785 } // namespace content |
| 781 | 786 |
| 782 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 787 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
| OLD | NEW |