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

Unified Diff: content/browser/frame_host/navigation_request.cc

Issue 2653953005: PlzNavigate: transmit redirect info to the renderer side (Closed)
Patch Set: PlzNavigate: transmit redirect info to the renderer side Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/navigation_request.cc
diff --git a/content/browser/frame_host/navigation_request.cc b/content/browser/frame_host/navigation_request.cc
index 4a0c7cec73ffc4825e29fd96547d6e33faaef1c2..b03518361b9b3d657b7ecd591326b12eebe12b3b 100644
--- a/content/browser/frame_host/navigation_request.cc
+++ b/content/browser/frame_host/navigation_request.cc
@@ -221,10 +221,12 @@ std::unique_ptr<NavigationRequest> NavigationRequest::CreateBrowserInitiated(
// the renderer in the first place as part of OpenURL.
bool browser_initiated = !entry.is_renderer_initiated();
+ CommonNavigationParams common_params = entry.ConstructCommonNavigationParams(
+ frame_entry, request_body, dest_url, dest_referrer, navigation_type,
+ previews_state, navigation_start);
+
std::unique_ptr<NavigationRequest> navigation_request(new NavigationRequest(
- frame_tree_node, entry.ConstructCommonNavigationParams(
- frame_entry, request_body, dest_url, dest_referrer,
- navigation_type, previews_state, navigation_start),
+ frame_tree_node, common_params,
BeginNavigationParams(entry.extra_headers(), net::LOAD_NORMAL,
false, // has_user_gestures
false, // skip_service_worker
@@ -232,7 +234,8 @@ std::unique_ptr<NavigationRequest> NavigationRequest::CreateBrowserInitiated(
blink::WebMixedContentContextType::Blockable,
initiator),
entry.ConstructRequestNavigationParams(
- frame_entry, is_history_navigation_in_new_child,
+ frame_entry, common_params.url, common_params.method,
+ is_history_navigation_in_new_child,
entry.GetSubframeUniqueNames(frame_tree_node),
frame_tree_node->has_committed_real_load(),
controller->GetPendingEntryIndex() == -1,
@@ -269,8 +272,9 @@ std::unique_ptr<NavigationRequest> NavigationRequest::CreateRendererInitiated(
// renderer and sent to the browser instead of being measured here.
// TODO(clamy): The pending history list offset should be properly set.
RequestNavigationParams request_params(
- false, // is_overriding_user_agent
- std::vector<GURL>(), // redirects
+ false, // is_overriding_user_agent
+ std::vector<GURL>(), // redirects
+ common_params.url, common_params.method,
nasko 2017/02/10 23:53:09 nit: Put each argument on a separate line to be co
clamy 2017/02/13 14:29:37 Done.
false, // can_load_local_resources
PageState(), // page_state
0, // nav_entry_id
@@ -447,6 +451,7 @@ void NavigationRequest::OnRequestRedirected(
request_params_.navigation_timing.fetch_start = base::TimeTicks::Now();
request_params_.redirect_response.push_back(response->head);
+ request_params_.redirect_infos.push_back(redirect_info);
request_params_.redirects.push_back(common_params_.url);
common_params_.url = redirect_info.new_url;

Powered by Google App Engine
This is Rietveld 408576698