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

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: DCHECK that browser_navigation_start is always present. Created 6 years, 6 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
« content/common/frame_messages.h ('K') | « content/common/frame_messages.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 92e7367871040aa18c6a4c27ab77a3ff6f68fbff..dcc8c5ac53c80173cacd848ee649e12d9c80d48b 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -884,10 +884,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.
« content/common/frame_messages.h ('K') | « content/common/frame_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698