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