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

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

Issue 818853005: Store NavigationEntryImpl data into NavigationRequest for later usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes from CR comments. Created 5 years, 11 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/navigator_impl.cc
diff --git a/content/browser/frame_host/navigator_impl.cc b/content/browser/frame_host/navigator_impl.cc
index c680cb199fecf72ebc900ce25a3088608063a288..b9dec2a351adea7ba1dc2cf07114fee97bd77aee 100644
--- a/content/browser/frame_host/navigator_impl.cc
+++ b/content/browser/frame_host/navigator_impl.cc
@@ -755,10 +755,9 @@ void NavigatorImpl::OnBeginNavigation(
// TODO(clamy): See if the navigation start time should be measured in the
// renderer and sent to the browser instead of being measured here.
scoped_ptr<NavigationRequest> scoped_request(new NavigationRequest(
- frame_tree_node,
- common_params,
- CommitNavigationParams(
- PageState(), false, base::TimeTicks::Now())));
+ frame_tree_node, common_params,
+ CommitNavigationParams(PageState(), false, base::TimeTicks::Now()),
+ nullptr));
navigation_request = scoped_request.get();
navigation_request_map_.set(
frame_tree_node->frame_tree_node_id(), scoped_request.Pass());
@@ -783,7 +782,7 @@ void NavigatorImpl::OnBeginNavigation(
// Then notify the RenderFrameHostManager so it can speculatively create a
// RenderFrameHost (and potentially a new renderer process) in parallel.
- frame_tree_node->render_manager()->BeginNavigation(common_params);
+ frame_tree_node->render_manager()->BeginNavigation(*navigation_request);
}
// PlzNavigate
@@ -809,8 +808,7 @@ void NavigatorImpl::CommitNavigation(FrameTreeNode* frame_tree_node,
// Select an appropriate renderer to commit the navigation.
RenderFrameHostImpl* render_frame_host =
frame_tree_node->render_manager()->GetFrameHostForNavigation(
- navigation_request->common_params().url,
- navigation_request->common_params().transition);
+ *navigation_request);
CheckWebUIRendererDoesNotDisplayNormalURL(
render_frame_host, navigation_request->common_params().url);
@@ -887,14 +885,13 @@ bool NavigatorImpl::RequestNavigation(
GetNavigationType(controller_->GetBrowserContext(), entry, reload_type);
scoped_ptr<NavigationRequest> navigation_request(new NavigationRequest(
frame_tree_node,
- CommonNavigationParams(entry.GetURL(),
- entry.GetReferrer(),
- entry.GetTransitionType(),
- navigation_type,
+ CommonNavigationParams(entry.GetURL(), entry.GetReferrer(),
+ entry.GetTransitionType(), navigation_type,
!entry.IsViewSourceMode()),
CommitNavigationParams(entry.GetPageState(),
entry.GetIsOverridingUserAgent(),
- navigation_start)));
+ navigation_start),
+ &entry));
clamy 2015/01/19 15:53:46 Please correct the indentation here.
carlosk 2015/01/19 16:08:52 This is apparently correct... I did run git cl for
clamy 2015/01/19 16:11:10 No you're right I read to quickly and though this
RequestNavigationParams request_params(entry.GetHasPostData(),
entry.extra_headers(),
entry.GetBrowserInitiatedPostData());

Powered by Google App Engine
This is Rietveld 408576698