| 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/loader/global_routing_id.h" | 7 #include "content/browser/loader/global_routing_id.h" |
| 8 #include "content/browser/loader/resource_message_filter.h" | 8 #include "content/browser/loader/resource_message_filter.h" |
| 9 #include "content/common/net/url_request_user_data.h" | 9 #include "content/common/net/url_request_user_data.h" |
| 10 #include "content/public/browser/global_request_id.h" | 10 #include "content/public/browser/global_request_id.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 false, // has_user_gesture | 63 false, // has_user_gesture |
| 64 false, // enable load timing | 64 false, // enable load timing |
| 65 request->has_upload(), // enable upload progress | 65 request->has_upload(), // enable upload progress |
| 66 false, // do_not_prompt_for_login | 66 false, // do_not_prompt_for_login |
| 67 blink::WebReferrerPolicyDefault, // referrer_policy | 67 blink::WebReferrerPolicyDefault, // referrer_policy |
| 68 blink::WebPageVisibilityStateVisible, // visibility_state | 68 blink::WebPageVisibilityStateVisible, // visibility_state |
| 69 context, // context | 69 context, // context |
| 70 base::WeakPtr<ResourceMessageFilter>(), // filter | 70 base::WeakPtr<ResourceMessageFilter>(), // filter |
| 71 false, // report_raw_headers | 71 false, // report_raw_headers |
| 72 is_async, // is_async | 72 is_async, // is_async |
| 73 is_using_lofi); // is_using_lofi | 73 is_using_lofi, // is_using_lofi |
| 74 std::string()); // original_headers |
| 74 info->AssociateWithRequest(request); | 75 info->AssociateWithRequest(request); |
| 75 } | 76 } |
| 76 | 77 |
| 77 // static | 78 // static |
| 78 bool ResourceRequestInfo::GetRenderFrameForRequest( | 79 bool ResourceRequestInfo::GetRenderFrameForRequest( |
| 79 const net::URLRequest* request, | 80 const net::URLRequest* request, |
| 80 int* render_process_id, | 81 int* render_process_id, |
| 81 int* render_frame_id) { | 82 int* render_frame_id) { |
| 82 URLRequestUserData* user_data = static_cast<URLRequestUserData*>( | 83 URLRequestUserData* user_data = static_cast<URLRequestUserData*>( |
| 83 request->GetUserData(URLRequestUserData::kUserDataKey)); | 84 request->GetUserData(URLRequestUserData::kUserDataKey)); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 bool has_user_gesture, | 124 bool has_user_gesture, |
| 124 bool enable_load_timing, | 125 bool enable_load_timing, |
| 125 bool enable_upload_progress, | 126 bool enable_upload_progress, |
| 126 bool do_not_prompt_for_login, | 127 bool do_not_prompt_for_login, |
| 127 blink::WebReferrerPolicy referrer_policy, | 128 blink::WebReferrerPolicy referrer_policy, |
| 128 blink::WebPageVisibilityState visibility_state, | 129 blink::WebPageVisibilityState visibility_state, |
| 129 ResourceContext* context, | 130 ResourceContext* context, |
| 130 base::WeakPtr<ResourceMessageFilter> filter, | 131 base::WeakPtr<ResourceMessageFilter> filter, |
| 131 bool report_raw_headers, | 132 bool report_raw_headers, |
| 132 bool is_async, | 133 bool is_async, |
| 133 bool is_using_lofi) | 134 bool is_using_lofi, |
| 135 const std::string& original_headers) |
| 134 : cross_site_handler_(NULL), | 136 : cross_site_handler_(NULL), |
| 135 detachable_handler_(NULL), | 137 detachable_handler_(NULL), |
| 136 process_type_(process_type), | 138 process_type_(process_type), |
| 137 child_id_(child_id), | 139 child_id_(child_id), |
| 138 route_id_(route_id), | 140 route_id_(route_id), |
| 139 frame_tree_node_id_(frame_tree_node_id), | 141 frame_tree_node_id_(frame_tree_node_id), |
| 140 origin_pid_(origin_pid), | 142 origin_pid_(origin_pid), |
| 141 request_id_(request_id), | 143 request_id_(request_id), |
| 142 render_frame_id_(render_frame_id), | 144 render_frame_id_(render_frame_id), |
| 143 is_main_frame_(is_main_frame), | 145 is_main_frame_(is_main_frame), |
| (...skipping 11 matching lines...) Expand all Loading... |
| 155 counted_as_in_flight_request_(false), | 157 counted_as_in_flight_request_(false), |
| 156 resource_type_(resource_type), | 158 resource_type_(resource_type), |
| 157 transition_type_(transition_type), | 159 transition_type_(transition_type), |
| 158 memory_cost_(0), | 160 memory_cost_(0), |
| 159 referrer_policy_(referrer_policy), | 161 referrer_policy_(referrer_policy), |
| 160 visibility_state_(visibility_state), | 162 visibility_state_(visibility_state), |
| 161 context_(context), | 163 context_(context), |
| 162 filter_(filter), | 164 filter_(filter), |
| 163 report_raw_headers_(report_raw_headers), | 165 report_raw_headers_(report_raw_headers), |
| 164 is_async_(is_async), | 166 is_async_(is_async), |
| 165 is_using_lofi_(is_using_lofi) { | 167 is_using_lofi_(is_using_lofi), |
| 168 original_headers_(original_headers) { |
| 166 } | 169 } |
| 167 | 170 |
| 168 ResourceRequestInfoImpl::~ResourceRequestInfoImpl() { | 171 ResourceRequestInfoImpl::~ResourceRequestInfoImpl() { |
| 169 } | 172 } |
| 170 | 173 |
| 171 ResourceContext* ResourceRequestInfoImpl::GetContext() const { | 174 ResourceContext* ResourceRequestInfoImpl::GetContext() const { |
| 172 return context_; | 175 return context_; |
| 173 } | 176 } |
| 174 | 177 |
| 175 int ResourceRequestInfoImpl::GetChildID() const { | 178 int ResourceRequestInfoImpl::GetChildID() const { |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 base::WeakPtr<ResourceMessageFilter> filter) { | 293 base::WeakPtr<ResourceMessageFilter> filter) { |
| 291 child_id_ = child_id; | 294 child_id_ = child_id; |
| 292 route_id_ = route_id; | 295 route_id_ = route_id; |
| 293 origin_pid_ = origin_pid; | 296 origin_pid_ = origin_pid; |
| 294 request_id_ = request_id; | 297 request_id_ = request_id; |
| 295 parent_render_frame_id_ = parent_render_frame_id; | 298 parent_render_frame_id_ = parent_render_frame_id; |
| 296 filter_ = filter; | 299 filter_ = filter; |
| 297 } | 300 } |
| 298 | 301 |
| 299 } // namespace content | 302 } // namespace content |
| OLD | NEW |