| 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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 // we mean setting the |referrer| on the |request|, associating the | 314 // we mean setting the |referrer| on the |request|, associating the |
| 315 // ResourceRequestInfoImpl structure with the |request|, etc. | 315 // ResourceRequestInfoImpl structure with the |request|, etc. |
| 316 // This function should be called for invoking the BeginURLRequest() function | 316 // This function should be called for invoking the BeginURLRequest() function |
| 317 // to initiate a URL request. | 317 // to initiate a URL request. |
| 318 void InitializeURLRequest(net::URLRequest* request, | 318 void InitializeURLRequest(net::URLRequest* request, |
| 319 const Referrer& referrer, | 319 const Referrer& referrer, |
| 320 bool is_download, | 320 bool is_download, |
| 321 int render_process_host_id, | 321 int render_process_host_id, |
| 322 int render_view_routing_id, | 322 int render_view_routing_id, |
| 323 int render_frame_routing_id, | 323 int render_frame_routing_id, |
| 324 int previews_state, |
| 324 ResourceContext* context); | 325 ResourceContext* context); |
| 325 | 326 |
| 326 // Helper function for initiating a URL request. The |is_download| and | 327 // Helper function for initiating a URL request. The |is_download| and |
| 327 // |is_content_initiated and |do_not_prompt_for_login| parameters are | 328 // |is_content_initiated and |do_not_prompt_for_login| parameters are |
| 328 // specific to download requests. | 329 // specific to download requests. |
| 329 // TODO(ananta) | 330 // TODO(ananta) |
| 330 // Look into a better way of passing these parameters in. | 331 // Look into a better way of passing these parameters in. |
| 331 // Please note that the InitializeURLRequest() function needs to be called | 332 // Please note that the InitializeURLRequest() function needs to be called |
| 332 // called to initialize the request before calling this function. | 333 // called to initialize the request before calling this function. |
| 333 void BeginURLRequest(std::unique_ptr<net::URLRequest> request, | 334 void BeginURLRequest(std::unique_ptr<net::URLRequest> request, |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 630 int request_id, | 631 int request_id, |
| 631 net::RequestPriority new_priority, | 632 net::RequestPriority new_priority, |
| 632 int intra_priority_value); | 633 int intra_priority_value); |
| 633 | 634 |
| 634 // Creates ResourceRequestInfoImpl for a download or page save. | 635 // Creates ResourceRequestInfoImpl for a download or page save. |
| 635 // |download| should be true if the request is a file download. | 636 // |download| should be true if the request is a file download. |
| 636 ResourceRequestInfoImpl* CreateRequestInfo( | 637 ResourceRequestInfoImpl* CreateRequestInfo( |
| 637 int child_id, | 638 int child_id, |
| 638 int render_view_route_id, | 639 int render_view_route_id, |
| 639 int render_frame_route_id, | 640 int render_frame_route_id, |
| 641 int previews_state, |
| 640 bool download, | 642 bool download, |
| 641 ResourceContext* context); | 643 ResourceContext* context); |
| 642 | 644 |
| 643 // Relationship of resource being authenticated with the top level page. | 645 // Relationship of resource being authenticated with the top level page. |
| 644 enum HttpAuthRelationType { | 646 enum HttpAuthRelationType { |
| 645 HTTP_AUTH_RELATION_TOP, // Top-level page itself | 647 HTTP_AUTH_RELATION_TOP, // Top-level page itself |
| 646 HTTP_AUTH_RELATION_SAME_DOMAIN, // Sub-content from same domain | 648 HTTP_AUTH_RELATION_SAME_DOMAIN, // Sub-content from same domain |
| 647 HTTP_AUTH_RELATION_BLOCKED_CROSS, // Blocked Sub-content from cross domain | 649 HTTP_AUTH_RELATION_BLOCKED_CROSS, // Blocked Sub-content from cross domain |
| 648 HTTP_AUTH_RELATION_ALLOWED_CROSS, // Allowed Sub-content per command line | 650 HTTP_AUTH_RELATION_ALLOWED_CROSS, // Allowed Sub-content per command line |
| 649 HTTP_AUTH_RELATION_LAST | 651 HTTP_AUTH_RELATION_LAST |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 782 | 784 |
| 783 // Points to the registered download handler intercept. | 785 // Points to the registered download handler intercept. |
| 784 CreateDownloadHandlerIntercept create_download_handler_intercept_; | 786 CreateDownloadHandlerIntercept create_download_handler_intercept_; |
| 785 | 787 |
| 786 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); | 788 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); |
| 787 }; | 789 }; |
| 788 | 790 |
| 789 } // namespace content | 791 } // namespace content |
| 790 | 792 |
| 791 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 793 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
| OLD | NEW |