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

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

Issue 2335133003: PlzNavigate: support the WebRequest API (Closed)
Patch Set: PlzNavigate: support the WebRequest API Created 4 years, 3 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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 } 295 }
296 296
297 bool ResourceRequestInfoImpl::IsUsingLoFi() const { 297 bool ResourceRequestInfoImpl::IsUsingLoFi() const {
298 return is_using_lofi_; 298 return is_using_lofi_;
299 } 299 }
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 {
306 return navigation_ui_data_.get();
307 }
308
305 void ResourceRequestInfoImpl::AssociateWithRequest(net::URLRequest* request) { 309 void ResourceRequestInfoImpl::AssociateWithRequest(net::URLRequest* request) {
306 request->SetUserData(NULL, this); 310 request->SetUserData(NULL, this);
307 int render_process_id; 311 int render_process_id;
308 int render_frame_id; 312 int render_frame_id;
309 if (GetAssociatedRenderFrame(&render_process_id, &render_frame_id)) { 313 if (GetAssociatedRenderFrame(&render_process_id, &render_frame_id)) {
310 request->SetUserData( 314 request->SetUserData(
311 URLRequestUserData::kUserDataKey, 315 URLRequestUserData::kUserDataKey,
312 new URLRequestUserData(render_process_id, render_frame_id)); 316 new URLRequestUserData(render_process_id, render_frame_id));
313 } 317 }
314 } 318 }
(...skipping 23 matching lines...) Expand all
338 origin_pid_ = origin_pid; 342 origin_pid_ = origin_pid;
339 request_id_ = request_id; 343 request_id_ = request_id;
340 filter_ = filter; 344 filter_ = filter;
341 } 345 }
342 346
343 void ResourceRequestInfoImpl::ResetBody() { 347 void ResourceRequestInfoImpl::ResetBody() {
344 body_ = nullptr; 348 body_ = nullptr;
345 } 349 }
346 350
347 } // namespace content 351 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698