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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 339573003: NavigationTiming: set navigationStart for navigations in new tabs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update browsertests. Created 6 years, 5 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/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 6ccb9f5995949069dbeadc97faa76fd507a3ac9b..b14d73098501c4d28ef46fab9b7f1336b6ba579f 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -886,10 +886,12 @@ void RenderFrameImpl::OnNavigate(const FrameMsg_Navigate_Params& params) {
frame->loadRequest(request);
- // If this is a cross-process navigation, the browser process will send
- // along the proper navigation start value.
- if (!params.browser_navigation_start.is_null() &&
- frame->provisionalDataSource()) {
+ // The browser provides the navigation_start time to bootstrap the
+ // Navigation Timing information for the browser-initiated navigations. In
+ // case of cross-process navigations, this carries over the time of
+ // finishing the onbeforeunload handler of the previous page.
+ DCHECK(!params.browser_navigation_start.is_null());
+ if (frame->provisionalDataSource()) {
// browser_navigation_start is likely before this process existed, so we
// can't use InterProcessTimeTicksConverter. Instead, the best we can do
// is just ensure we don't report a bogus value in the future.
« no previous file with comments | « content/renderer/accessibility/renderer_accessibility_browsertest.cc ('k') | content/renderer/render_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698