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

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

Issue 2335133003: PlzNavigate: support the WebRequest API (Closed)
Patch Set: Rebase + addressed nit 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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 } 298 }
299 299
300 bool ResourceRequestInfoImpl::IsUsingLoFi() const { 300 bool ResourceRequestInfoImpl::IsUsingLoFi() const {
301 return is_using_lofi_; 301 return is_using_lofi_;
302 } 302 }
303 303
304 bool ResourceRequestInfoImpl::ShouldReportRawHeaders() const { 304 bool ResourceRequestInfoImpl::ShouldReportRawHeaders() const {
305 return report_raw_headers_; 305 return report_raw_headers_;
306 } 306 }
307 307
308 NavigationUIData* ResourceRequestInfoImpl::GetNavigationUIData() const {
309 return navigation_ui_data_.get();
310 }
311
308 void ResourceRequestInfoImpl::AssociateWithRequest(net::URLRequest* request) { 312 void ResourceRequestInfoImpl::AssociateWithRequest(net::URLRequest* request) {
309 request->SetUserData(NULL, this); 313 request->SetUserData(NULL, this);
310 int render_process_id; 314 int render_process_id;
311 int render_frame_id; 315 int render_frame_id;
312 if (GetAssociatedRenderFrame(&render_process_id, &render_frame_id)) { 316 if (GetAssociatedRenderFrame(&render_process_id, &render_frame_id)) {
313 request->SetUserData( 317 request->SetUserData(
314 URLRequestUserData::kUserDataKey, 318 URLRequestUserData::kUserDataKey,
315 new URLRequestUserData(render_process_id, render_frame_id)); 319 new URLRequestUserData(render_process_id, render_frame_id));
316 } 320 }
317 } 321 }
(...skipping 23 matching lines...) Expand all
341 origin_pid_ = origin_pid; 345 origin_pid_ = origin_pid;
342 request_id_ = request_id; 346 request_id_ = request_id;
343 filter_ = filter; 347 filter_ = filter;
344 } 348 }
345 349
346 void ResourceRequestInfoImpl::ResetBody() { 350 void ResourceRequestInfoImpl::ResetBody() {
347 body_ = nullptr; 351 body_ = nullptr;
348 } 352 }
349 353
350 } // namespace content 354 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/resource_request_info_impl.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698