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

Side by Side Diff: content/browser/frame_host/navigation_request.cc

Issue 1956383003: Forwarding POST body into renderer after a cross-site transfer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/frame_host/navigation_request.h" 5 #include "content/browser/frame_host/navigation_request.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "content/browser/devtools/render_frame_devtools_agent_host.h" 9 #include "content/browser/devtools/render_frame_devtools_agent_host.h"
10 #include "content/browser/frame_host/frame_tree.h" 10 #include "content/browser/frame_host/frame_tree.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 state_ = STARTED; 207 state_ = STARTED;
208 RenderFrameDevToolsAgentHost::OnBeforeNavigation(navigation_handle_.get()); 208 RenderFrameDevToolsAgentHost::OnBeforeNavigation(navigation_handle_.get());
209 209
210 if (ShouldMakeNetworkRequestForURL(common_params_.url)) { 210 if (ShouldMakeNetworkRequestForURL(common_params_.url)) {
211 // It's safe to use base::Unretained because this NavigationRequest owns 211 // It's safe to use base::Unretained because this NavigationRequest owns
212 // the NavigationHandle where the callback will be stored. 212 // the NavigationHandle where the callback will be stored.
213 // TODO(clamy): pass the real value for |is_external_protocol| if needed. 213 // TODO(clamy): pass the real value for |is_external_protocol| if needed.
214 // TODO(clamy): pass the method to the NavigationHandle instead of a 214 // TODO(clamy): pass the method to the NavigationHandle instead of a
215 // boolean. 215 // boolean.
216 navigation_handle_->WillStartRequest( 216 navigation_handle_->WillStartRequest(
217 common_params_.method, Referrer::SanitizeForRequest( 217 common_params_.method, info_->request_body,
218 common_params_.url, common_params_.referrer), 218 Referrer::SanitizeForRequest(common_params_.url,
219 common_params_.referrer),
219 begin_params_.has_user_gesture, common_params_.transition, false, 220 begin_params_.has_user_gesture, common_params_.transition, false,
220 base::Bind(&NavigationRequest::OnStartChecksComplete, 221 base::Bind(&NavigationRequest::OnStartChecksComplete,
221 base::Unretained(this))); 222 base::Unretained(this)));
222 return; 223 return;
223 } 224 }
224 225
225 // There is no need to make a network request for this navigation, so commit 226 // There is no need to make a network request for this navigation, so commit
226 // it immediately. 227 // it immediately.
227 state_ = RESPONSE_STARTED; 228 state_ = RESPONSE_STARTED;
228 229
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 browser_context, navigating_frame_host->GetSiteInstance()); 455 browser_context, navigating_frame_host->GetSiteInstance());
455 DCHECK(partition); 456 DCHECK(partition);
456 457
457 ServiceWorkerContextWrapper* service_worker_context = 458 ServiceWorkerContextWrapper* service_worker_context =
458 static_cast<ServiceWorkerContextWrapper*>( 459 static_cast<ServiceWorkerContextWrapper*>(
459 partition->GetServiceWorkerContext()); 460 partition->GetServiceWorkerContext());
460 navigation_handle_->InitServiceWorkerHandle(service_worker_context); 461 navigation_handle_->InitServiceWorkerHandle(service_worker_context);
461 } 462 }
462 463
463 } // namespace content 464 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698