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

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

Issue 1425823002: (DEPRECATED) Send navigation_start to browser process in DidStartProvisionalLoad (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Name change + blink layering Created 5 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 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 5d9f22528208fe1beaa2dd7ec1b3c455b248e52c..aa7e8716f2841581815c58eb1359284d9cffcde1 100644
--- a/content/browser/frame_host/navigator_impl.cc
+++ b/content/browser/frame_host/navigator_impl.cc
@@ -119,7 +119,8 @@ NavigationController* NavigatorImpl::GetController() {
void NavigatorImpl::DidStartProvisionalLoad(
RenderFrameHostImpl* render_frame_host,
- const GURL& url) {
+ const GURL& url,
+ double navigation_start) {
bool is_main_frame = render_frame_host->frame_tree_node()->IsMainFrame();
bool is_error_page = (url.spec() == kUnreachableWebDataURL);
bool is_iframe_srcdoc = (url.spec() == kAboutSrcDocURL);
@@ -160,7 +161,7 @@ void NavigatorImpl::DidStartProvisionalLoad(
}
render_frame_host->SetNavigationHandle(NavigationHandleImpl::Create(
- validated_url, render_frame_host->frame_tree_node()));
+ validated_url, render_frame_host->frame_tree_node(), navigation_start));
}
void NavigatorImpl::DidFailProvisionalLoadWithError(
@@ -686,7 +687,8 @@ void NavigatorImpl::OnBeginNavigation(
controller_->GetLastCommittedEntryIndex(),
controller_->GetEntryCount()));
NavigationRequest* navigation_request = frame_tree_node->navigation_request();
- navigation_request->CreateNavigationHandle();
+ navigation_request->CreateNavigationHandle(
+ begin_params.renderer_navigation_start);
if (frame_tree_node->IsMainFrame()) {
// Renderer-initiated main-frame navigations that need to swap processes
@@ -855,7 +857,10 @@ void NavigatorImpl::RequestNavigation(
navigation_type, is_same_document_history_load, navigation_start,
controller_));
NavigationRequest* navigation_request = frame_tree_node->navigation_request();
- navigation_request->CreateNavigationHandle();
+
+ double navigation_start_seconds =
+ (navigation_start - base::TimeTicks()).InSecondsF();
+ navigation_request->CreateNavigationHandle(navigation_start_seconds);
// Have the current renderer execute its beforeunload event if needed. If it
// is not needed (when beforeunload dispatch is not needed or this navigation

Powered by Google App Engine
This is Rietveld 408576698