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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 allow_download, // allow_download | 80 allow_download, // allow_download |
81 false, // has_user_gesture | 81 false, // has_user_gesture |
82 false, // enable load timing | 82 false, // enable load timing |
83 request->has_upload(), // enable upload progress | 83 request->has_upload(), // enable upload progress |
84 false, // do_not_prompt_for_login | 84 false, // do_not_prompt_for_login |
85 blink::WebReferrerPolicyDefault, // referrer_policy | 85 blink::WebReferrerPolicyDefault, // referrer_policy |
86 blink::WebPageVisibilityStateVisible, // visibility_state | 86 blink::WebPageVisibilityStateVisible, // visibility_state |
87 context, // context | 87 context, // context |
88 base::WeakPtr<ResourceMessageFilter>(), // filter | 88 base::WeakPtr<ResourceMessageFilter>(), // filter |
89 false, // report_raw_headers | 89 false, // report_raw_headers |
| 90 false, // send_extra_certificate_info |
90 is_async, // is_async | 91 is_async, // is_async |
91 is_using_lofi, // is_using_lofi | 92 is_using_lofi, // is_using_lofi |
92 std::string()); // original_headers | 93 std::string()); // original_headers |
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, |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 bool allow_download, | 148 bool allow_download, |
148 bool has_user_gesture, | 149 bool has_user_gesture, |
149 bool enable_load_timing, | 150 bool enable_load_timing, |
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, |
| 158 bool send_extra_certificate_info, |
157 bool is_async, | 159 bool is_async, |
158 bool is_using_lofi, | 160 bool is_using_lofi, |
159 const std::string& original_headers) | 161 const std::string& original_headers) |
160 : cross_site_handler_(NULL), | 162 : cross_site_handler_(NULL), |
161 detachable_handler_(NULL), | 163 detachable_handler_(NULL), |
162 process_type_(process_type), | 164 process_type_(process_type), |
163 child_id_(child_id), | 165 child_id_(child_id), |
164 route_id_(route_id), | 166 route_id_(route_id), |
165 frame_tree_node_id_(frame_tree_node_id), | 167 frame_tree_node_id_(frame_tree_node_id), |
166 origin_pid_(origin_pid), | 168 origin_pid_(origin_pid), |
(...skipping 12 matching lines...) Expand all Loading... |
179 was_ignored_by_handler_(false), | 181 was_ignored_by_handler_(false), |
180 counted_as_in_flight_request_(false), | 182 counted_as_in_flight_request_(false), |
181 resource_type_(resource_type), | 183 resource_type_(resource_type), |
182 transition_type_(transition_type), | 184 transition_type_(transition_type), |
183 memory_cost_(0), | 185 memory_cost_(0), |
184 referrer_policy_(referrer_policy), | 186 referrer_policy_(referrer_policy), |
185 visibility_state_(visibility_state), | 187 visibility_state_(visibility_state), |
186 context_(context), | 188 context_(context), |
187 filter_(filter), | 189 filter_(filter), |
188 report_raw_headers_(report_raw_headers), | 190 report_raw_headers_(report_raw_headers), |
| 191 send_extra_certificate_info_(send_extra_certificate_info), |
189 is_async_(is_async), | 192 is_async_(is_async), |
190 is_using_lofi_(is_using_lofi), | 193 is_using_lofi_(is_using_lofi), |
191 original_headers_(original_headers) { | 194 original_headers_(original_headers) { |
192 } | 195 } |
193 | 196 |
194 ResourceRequestInfoImpl::~ResourceRequestInfoImpl() { | 197 ResourceRequestInfoImpl::~ResourceRequestInfoImpl() { |
195 } | 198 } |
196 | 199 |
197 ResourceRequestInfo::WebContentsGetter | 200 ResourceRequestInfo::WebContentsGetter |
198 ResourceRequestInfoImpl::GetWebContentsGetterForRequest() const { | 201 ResourceRequestInfoImpl::GetWebContentsGetterForRequest() const { |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 } | 294 } |
292 | 295 |
293 bool ResourceRequestInfoImpl::IsUsingLoFi() const { | 296 bool ResourceRequestInfoImpl::IsUsingLoFi() const { |
294 return is_using_lofi_; | 297 return is_using_lofi_; |
295 } | 298 } |
296 | 299 |
297 bool ResourceRequestInfoImpl::ShouldReportRawHeaders() const { | 300 bool ResourceRequestInfoImpl::ShouldReportRawHeaders() const { |
298 return report_raw_headers_; | 301 return report_raw_headers_; |
299 } | 302 } |
300 | 303 |
| 304 bool ResourceRequestInfoImpl::ShouldSendExtraCertificateInfo() const { |
| 305 return send_extra_certificate_info_; |
| 306 } |
| 307 |
301 void ResourceRequestInfoImpl::AssociateWithRequest(net::URLRequest* request) { | 308 void ResourceRequestInfoImpl::AssociateWithRequest(net::URLRequest* request) { |
302 request->SetUserData(NULL, this); | 309 request->SetUserData(NULL, this); |
303 int render_process_id; | 310 int render_process_id; |
304 int render_frame_id; | 311 int render_frame_id; |
305 if (GetAssociatedRenderFrame(&render_process_id, &render_frame_id)) { | 312 if (GetAssociatedRenderFrame(&render_process_id, &render_frame_id)) { |
306 request->SetUserData( | 313 request->SetUserData( |
307 URLRequestUserData::kUserDataKey, | 314 URLRequestUserData::kUserDataKey, |
308 new URLRequestUserData(render_process_id, render_frame_id)); | 315 new URLRequestUserData(render_process_id, render_frame_id)); |
309 } | 316 } |
310 } | 317 } |
(...skipping 19 matching lines...) Expand all Loading... |
330 base::WeakPtr<ResourceMessageFilter> filter) { | 337 base::WeakPtr<ResourceMessageFilter> filter) { |
331 child_id_ = child_id; | 338 child_id_ = child_id; |
332 route_id_ = route_id; | 339 route_id_ = route_id; |
333 render_frame_id_ = render_frame_id; | 340 render_frame_id_ = render_frame_id; |
334 origin_pid_ = origin_pid; | 341 origin_pid_ = origin_pid; |
335 request_id_ = request_id; | 342 request_id_ = request_id; |
336 filter_ = filter; | 343 filter_ = filter; |
337 } | 344 } |
338 | 345 |
339 } // namespace content | 346 } // namespace content |
OLD | NEW |