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 #include "content/browser/loader/resource_request_info_impl.h" | 5 #include "content/browser/loader/resource_request_info_impl.h" |
6 | 6 |
7 #include "content/browser/frame_host/frame_tree_node.h" | 7 #include "content/browser/frame_host/frame_tree_node.h" |
8 #include "content/browser/loader/global_routing_id.h" | 8 #include "content/browser/loader/global_routing_id.h" |
9 #include "content/browser/loader/resource_message_filter.h" | 9 #include "content/browser/loader/resource_message_filter.h" |
10 #include "content/browser/web_contents/web_contents_impl.h" | 10 #include "content/browser/web_contents/web_contents_impl.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 request->has_upload(), // enable upload progress | 82 request->has_upload(), // enable upload progress |
83 false, // do_not_prompt_for_login | 83 false, // do_not_prompt_for_login |
84 blink::WebReferrerPolicyDefault, // referrer_policy | 84 blink::WebReferrerPolicyDefault, // referrer_policy |
85 blink::WebPageVisibilityStateVisible, // visibility_state | 85 blink::WebPageVisibilityStateVisible, // visibility_state |
86 context, // context | 86 context, // context |
87 base::WeakPtr<ResourceMessageFilter>(), // filter | 87 base::WeakPtr<ResourceMessageFilter>(), // filter |
88 false, // report_raw_headers | 88 false, // report_raw_headers |
89 is_async, // is_async | 89 is_async, // is_async |
90 is_using_lofi, // is_using_lofi | 90 is_using_lofi, // is_using_lofi |
91 std::string(), // original_headers | 91 std::string(), // original_headers |
92 nullptr); // body | 92 nullptr, // body |
| 93 false); // initiated_in_secure_context |
93 info->AssociateWithRequest(request); | 94 info->AssociateWithRequest(request); |
94 } | 95 } |
95 | 96 |
96 // static | 97 // static |
97 bool ResourceRequestInfo::GetRenderFrameForRequest( | 98 bool ResourceRequestInfo::GetRenderFrameForRequest( |
98 const net::URLRequest* request, | 99 const net::URLRequest* request, |
99 int* render_process_id, | 100 int* render_process_id, |
100 int* render_frame_id) { | 101 int* render_frame_id) { |
101 URLRequestUserData* user_data = static_cast<URLRequestUserData*>( | 102 URLRequestUserData* user_data = static_cast<URLRequestUserData*>( |
102 request->GetUserData(URLRequestUserData::kUserDataKey)); | 103 request->GetUserData(URLRequestUserData::kUserDataKey)); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 bool enable_upload_progress, | 151 bool enable_upload_progress, |
151 bool do_not_prompt_for_login, | 152 bool do_not_prompt_for_login, |
152 blink::WebReferrerPolicy referrer_policy, | 153 blink::WebReferrerPolicy referrer_policy, |
153 blink::WebPageVisibilityState visibility_state, | 154 blink::WebPageVisibilityState visibility_state, |
154 ResourceContext* context, | 155 ResourceContext* context, |
155 base::WeakPtr<ResourceMessageFilter> filter, | 156 base::WeakPtr<ResourceMessageFilter> filter, |
156 bool report_raw_headers, | 157 bool report_raw_headers, |
157 bool is_async, | 158 bool is_async, |
158 bool is_using_lofi, | 159 bool is_using_lofi, |
159 const std::string& original_headers, | 160 const std::string& original_headers, |
160 const scoped_refptr<ResourceRequestBodyImpl> body) | 161 const scoped_refptr<ResourceRequestBodyImpl> body, |
| 162 bool initiated_in_secure_context) |
161 : cross_site_handler_(NULL), | 163 : cross_site_handler_(NULL), |
162 detachable_handler_(NULL), | 164 detachable_handler_(NULL), |
163 process_type_(process_type), | 165 process_type_(process_type), |
164 child_id_(child_id), | 166 child_id_(child_id), |
165 route_id_(route_id), | 167 route_id_(route_id), |
166 frame_tree_node_id_(frame_tree_node_id), | 168 frame_tree_node_id_(frame_tree_node_id), |
167 origin_pid_(origin_pid), | 169 origin_pid_(origin_pid), |
168 request_id_(request_id), | 170 request_id_(request_id), |
169 render_frame_id_(render_frame_id), | 171 render_frame_id_(render_frame_id), |
170 is_main_frame_(is_main_frame), | 172 is_main_frame_(is_main_frame), |
(...skipping 12 matching lines...) Expand all Loading... |
183 transition_type_(transition_type), | 185 transition_type_(transition_type), |
184 memory_cost_(0), | 186 memory_cost_(0), |
185 referrer_policy_(referrer_policy), | 187 referrer_policy_(referrer_policy), |
186 visibility_state_(visibility_state), | 188 visibility_state_(visibility_state), |
187 context_(context), | 189 context_(context), |
188 filter_(filter), | 190 filter_(filter), |
189 report_raw_headers_(report_raw_headers), | 191 report_raw_headers_(report_raw_headers), |
190 is_async_(is_async), | 192 is_async_(is_async), |
191 is_using_lofi_(is_using_lofi), | 193 is_using_lofi_(is_using_lofi), |
192 original_headers_(original_headers), | 194 original_headers_(original_headers), |
193 body_(body) {} | 195 body_(body), |
| 196 initiated_in_secure_context_(initiated_in_secure_context) {} |
194 | 197 |
195 ResourceRequestInfoImpl::~ResourceRequestInfoImpl() { | 198 ResourceRequestInfoImpl::~ResourceRequestInfoImpl() { |
196 } | 199 } |
197 | 200 |
198 ResourceRequestInfo::WebContentsGetter | 201 ResourceRequestInfo::WebContentsGetter |
199 ResourceRequestInfoImpl::GetWebContentsGetterForRequest() const { | 202 ResourceRequestInfoImpl::GetWebContentsGetterForRequest() const { |
200 // PlzNavigate: navigation requests are created with a valid FrameTreeNode ID | 203 // PlzNavigate: navigation requests are created with a valid FrameTreeNode ID |
201 // and invalid RenderProcessHost and RenderFrameHost IDs. The FrameTreeNode | 204 // and invalid RenderProcessHost and RenderFrameHost IDs. The FrameTreeNode |
202 // ID should be used to access the WebContents. | 205 // ID should be used to access the WebContents. |
203 if (frame_tree_node_id_ != -1) { | 206 if (frame_tree_node_id_ != -1) { |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 origin_pid_ = origin_pid; | 338 origin_pid_ = origin_pid; |
336 request_id_ = request_id; | 339 request_id_ = request_id; |
337 filter_ = filter; | 340 filter_ = filter; |
338 } | 341 } |
339 | 342 |
340 void ResourceRequestInfoImpl::ResetBody() { | 343 void ResourceRequestInfoImpl::ResetBody() { |
341 body_ = nullptr; | 344 body_ = nullptr; |
342 } | 345 } |
343 | 346 |
344 } // namespace content | 347 } // namespace content |
OLD | NEW |