Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(552)

Side by Side Diff: content/browser/loader/resource_request_info_impl.cc

Issue 2335133003: PlzNavigate: support the WebRequest API (Closed)
Patch Set: Addressed comments + changes to NavigationHandleImpl following 2364943002 Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 } 299 }
300 300
301 bool ResourceRequestInfoImpl::IsUsingLoFi() const { 301 bool ResourceRequestInfoImpl::IsUsingLoFi() const {
302 return is_using_lofi_; 302 return is_using_lofi_;
303 } 303 }
304 304
305 bool ResourceRequestInfoImpl::ShouldReportRawHeaders() const { 305 bool ResourceRequestInfoImpl::ShouldReportRawHeaders() const {
306 return report_raw_headers_; 306 return report_raw_headers_;
307 } 307 }
308 308
309 NavigationUIData* ResourceRequestInfoImpl::GetNavigationUIData() const {
310 return navigation_ui_data_.get();
311 }
312
309 void ResourceRequestInfoImpl::AssociateWithRequest(net::URLRequest* request) { 313 void ResourceRequestInfoImpl::AssociateWithRequest(net::URLRequest* request) {
310 request->SetUserData(NULL, this); 314 request->SetUserData(NULL, this);
311 int render_process_id; 315 int render_process_id;
312 int render_frame_id; 316 int render_frame_id;
313 if (GetAssociatedRenderFrame(&render_process_id, &render_frame_id)) { 317 if (GetAssociatedRenderFrame(&render_process_id, &render_frame_id)) {
314 request->SetUserData( 318 request->SetUserData(
315 URLRequestUserData::kUserDataKey, 319 URLRequestUserData::kUserDataKey,
316 new URLRequestUserData(render_process_id, render_frame_id)); 320 new URLRequestUserData(render_process_id, render_frame_id));
317 } 321 }
318 } 322 }
(...skipping 23 matching lines...) Expand all
342 origin_pid_ = origin_pid; 346 origin_pid_ = origin_pid;
343 request_id_ = request_id; 347 request_id_ = request_id;
344 filter_ = filter; 348 filter_ = filter;
345 } 349 }
346 350
347 void ResourceRequestInfoImpl::ResetBody() { 351 void ResourceRequestInfoImpl::ResetBody() {
348 body_ = nullptr; 352 body_ = nullptr;
349 } 353 }
350 354
351 } // namespace content 355 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698