| 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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 | 300 |
| 301 bool ResourceRequestInfoImpl::ShouldReportRawHeaders() const { | 301 bool ResourceRequestInfoImpl::ShouldReportRawHeaders() const { |
| 302 return report_raw_headers_; | 302 return report_raw_headers_; |
| 303 } | 303 } |
| 304 | 304 |
| 305 NavigationUIData* ResourceRequestInfoImpl::GetNavigationUIData() const { | 305 NavigationUIData* ResourceRequestInfoImpl::GetNavigationUIData() const { |
| 306 return navigation_ui_data_.get(); | 306 return navigation_ui_data_.get(); |
| 307 } | 307 } |
| 308 | 308 |
| 309 void ResourceRequestInfoImpl::AssociateWithRequest(net::URLRequest* request) { | 309 void ResourceRequestInfoImpl::AssociateWithRequest(net::URLRequest* request) { |
| 310 request->SetUserData(NULL, this); | 310 request->SetUserData(NULL, base::WrapUnique(this)); |
| 311 int render_process_id; | 311 int render_process_id; |
| 312 int render_frame_id; | 312 int render_frame_id; |
| 313 if (GetAssociatedRenderFrame(&render_process_id, &render_frame_id)) { | 313 if (GetAssociatedRenderFrame(&render_process_id, &render_frame_id)) { |
| 314 request->SetUserData( | 314 request->SetUserData(URLRequestUserData::kUserDataKey, |
| 315 URLRequestUserData::kUserDataKey, | 315 base::MakeUnique<URLRequestUserData>(render_process_id, |
| 316 new URLRequestUserData(render_process_id, render_frame_id)); | 316 render_frame_id)); |
| 317 } | 317 } |
| 318 } | 318 } |
| 319 | 319 |
| 320 int ResourceRequestInfoImpl::GetRequestID() const { | 320 int ResourceRequestInfoImpl::GetRequestID() const { |
| 321 return request_id_; | 321 return request_id_; |
| 322 } | 322 } |
| 323 | 323 |
| 324 GlobalRoutingID ResourceRequestInfoImpl::GetGlobalRoutingID() const { | 324 GlobalRoutingID ResourceRequestInfoImpl::GetGlobalRoutingID() const { |
| 325 return GlobalRoutingID(GetChildID(), route_id_); | 325 return GlobalRoutingID(GetChildID(), route_id_); |
| 326 } | 326 } |
| (...skipping 17 matching lines...) Expand all Loading... |
| 344 on_transfer_.Run(std::move(url_loader_request), | 344 on_transfer_.Run(std::move(url_loader_request), |
| 345 std::move(url_loader_client)); | 345 std::move(url_loader_client)); |
| 346 } | 346 } |
| 347 } | 347 } |
| 348 | 348 |
| 349 void ResourceRequestInfoImpl::ResetBody() { | 349 void ResourceRequestInfoImpl::ResetBody() { |
| 350 body_ = nullptr; | 350 body_ = nullptr; |
| 351 } | 351 } |
| 352 | 352 |
| 353 } // namespace content | 353 } // namespace content |
| OLD | NEW |