Chromium Code Reviews| 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. | |
| 346 // Note that this cancel is subtly different from the other CancelRequest | |
| 347 // methods in this file, which also tear down the loader. | |
|
kinuko
2016/11/16 03:00:34
nit: might be good to also note that this is calle
yhirano
2016/11/16 03:13:10
Done.
| |
| 348 void CancelRequestFromRenderer(GlobalRequestID request_id); | |
| 349 | |
| 345 private: | 350 private: |
| 346 friend class ResourceDispatcherHostTest; | 351 friend class ResourceDispatcherHostTest; |
| 347 | 352 |
| 348 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 353 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
| 349 TestBlockedRequestsProcessDies); | 354 TestBlockedRequestsProcessDies); |
| 350 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 355 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
| 351 CalculateApproximateMemoryCost); | 356 CalculateApproximateMemoryCost); |
| 352 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 357 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
| 353 DetachableResourceTimesOut); | 358 DetachableResourceTimesOut); |
| 354 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 359 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 767 | 772 |
| 768 // Points to the registered download handler intercept. | 773 // Points to the registered download handler intercept. |
| 769 CreateDownloadHandlerIntercept create_download_handler_intercept_; | 774 CreateDownloadHandlerIntercept create_download_handler_intercept_; |
| 770 | 775 |
| 771 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); | 776 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); |
| 772 }; | 777 }; |
| 773 | 778 |
| 774 } // namespace content | 779 } // namespace content |
| 775 | 780 |
| 776 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 781 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
| OLD | NEW |