| 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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 // called to initialize the request before calling this function. | 330 // called to initialize the request before calling this function. |
| 331 void BeginURLRequest(std::unique_ptr<net::URLRequest> request, | 331 void BeginURLRequest(std::unique_ptr<net::URLRequest> request, |
| 332 std::unique_ptr<ResourceHandler> handler, | 332 std::unique_ptr<ResourceHandler> handler, |
| 333 bool is_download, | 333 bool is_download, |
| 334 bool is_content_initiated, | 334 bool is_content_initiated, |
| 335 bool do_not_prompt_for_login, | 335 bool do_not_prompt_for_login, |
| 336 ResourceContext* context); | 336 ResourceContext* context); |
| 337 | 337 |
| 338 bool is_shutdown() const { return is_shutdown_; } | 338 bool is_shutdown() const { return is_shutdown_; } |
| 339 | 339 |
| 340 // Creates a new request ID for browser initiated requests. See the comments |
| 341 // of |request_id_| for the details. Must be called on the IO thread. |
| 342 int MakeRequestID(); |
| 343 |
| 340 private: | 344 private: |
| 341 friend class ResourceDispatcherHostTest; | 345 friend class ResourceDispatcherHostTest; |
| 342 | 346 |
| 343 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 347 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
| 344 TestBlockedRequestsProcessDies); | 348 TestBlockedRequestsProcessDies); |
| 345 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 349 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
| 346 CalculateApproximateMemoryCost); | 350 CalculateApproximateMemoryCost); |
| 347 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 351 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
| 348 DetachableResourceTimesOut); | 352 DetachableResourceTimesOut); |
| 349 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 353 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
| (...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 757 | 761 |
| 758 // Points to the registered download handler intercept. | 762 // Points to the registered download handler intercept. |
| 759 CreateDownloadHandlerIntercept create_download_handler_intercept_; | 763 CreateDownloadHandlerIntercept create_download_handler_intercept_; |
| 760 | 764 |
| 761 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); | 765 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); |
| 762 }; | 766 }; |
| 763 | 767 |
| 764 } // namespace content | 768 } // namespace content |
| 765 | 769 |
| 766 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 770 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
| OLD | NEW |