OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading | 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading |
6 | 6 |
7 #include "content/browser/renderer_host/resource_dispatcher_host.h" | 7 #include "content/browser/renderer_host/resource_dispatcher_host.h" |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
632 request_data.is_main_frame, | 632 request_data.is_main_frame, |
633 request_data.frame_id, | 633 request_data.frame_id, |
634 request_data.parent_is_main_frame, | 634 request_data.parent_is_main_frame, |
635 request_data.parent_frame_id, | 635 request_data.parent_frame_id, |
636 request_data.resource_type, | 636 request_data.resource_type, |
637 request_data.transition_type, | 637 request_data.transition_type, |
638 upload_size, | 638 upload_size, |
639 false, // is download | 639 false, // is download |
640 ResourceType::IsFrame(request_data.resource_type), // allow_download | 640 ResourceType::IsFrame(request_data.resource_type), // allow_download |
641 request_data.has_user_gesture, | 641 request_data.has_user_gesture, |
| 642 request_data.referrer_policy, |
642 &resource_context); | 643 &resource_context); |
643 SetRequestInfo(request, extra_info); // Request takes ownership. | 644 SetRequestInfo(request, extra_info); // Request takes ownership. |
644 | 645 |
645 if (request->url().SchemeIs(chrome::kBlobScheme)) { | 646 if (request->url().SchemeIs(chrome::kBlobScheme)) { |
646 // Hang on to a reference to ensure the blob is not released prior | 647 // Hang on to a reference to ensure the blob is not released prior |
647 // to the job being started. | 648 // to the job being started. |
648 webkit_blob::BlobStorageController* controller = | 649 webkit_blob::BlobStorageController* controller = |
649 resource_context.blob_storage_context()->controller(); | 650 resource_context.blob_storage_context()->controller(); |
650 extra_info->set_requested_blob_data( | 651 extra_info->set_requested_blob_data( |
651 controller->GetBlobDataFromUrl(request->url())); | 652 controller->GetBlobDataFromUrl(request->url())); |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
801 false, // is_main_frame | 802 false, // is_main_frame |
802 -1, // frame_id | 803 -1, // frame_id |
803 false, // parent_is_main_frame | 804 false, // parent_is_main_frame |
804 -1, // parent_frame_id | 805 -1, // parent_frame_id |
805 ResourceType::SUB_RESOURCE, | 806 ResourceType::SUB_RESOURCE, |
806 content::PAGE_TRANSITION_LINK, | 807 content::PAGE_TRANSITION_LINK, |
807 0, // upload_size | 808 0, // upload_size |
808 download, // is_download | 809 download, // is_download |
809 download, // allow_download | 810 download, // allow_download |
810 false, // has_user_gesture | 811 false, // has_user_gesture |
| 812 WebKit::WebReferrerPolicyDefault, |
811 &context); | 813 &context); |
812 } | 814 } |
813 | 815 |
814 void ResourceDispatcherHost::OnSwapOutACK( | 816 void ResourceDispatcherHost::OnSwapOutACK( |
815 const ViewMsg_SwapOut_Params& params) { | 817 const ViewMsg_SwapOut_Params& params) { |
816 // Closes for cross-site transitions are handled such that the cross-site | 818 // Closes for cross-site transitions are handled such that the cross-site |
817 // transition continues. | 819 // transition continues. |
818 GlobalRequestID global_id(params.new_render_process_host_id, | 820 GlobalRequestID global_id(params.new_render_process_host_id, |
819 params.new_request_id); | 821 params.new_request_id); |
820 PendingRequestList::iterator i = pending_requests_.find(global_id); | 822 PendingRequestList::iterator i = pending_requests_.find(global_id); |
(...skipping 1411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2232 | 2234 |
2233 void ResourceDispatcherHost::set_allow_cross_origin_auth_prompt(bool value) { | 2235 void ResourceDispatcherHost::set_allow_cross_origin_auth_prompt(bool value) { |
2234 allow_cross_origin_auth_prompt_ = value; | 2236 allow_cross_origin_auth_prompt_ = value; |
2235 } | 2237 } |
2236 | 2238 |
2237 void ResourceDispatcherHost::MarkAsTransferredNavigation( | 2239 void ResourceDispatcherHost::MarkAsTransferredNavigation( |
2238 const GlobalRequestID& transferred_request_id, | 2240 const GlobalRequestID& transferred_request_id, |
2239 net::URLRequest* ransferred_request) { | 2241 net::URLRequest* ransferred_request) { |
2240 transferred_navigations_[transferred_request_id] = ransferred_request; | 2242 transferred_navigations_[transferred_request_id] = ransferred_request; |
2241 } | 2243 } |
OLD | NEW |