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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2359723007: PlzNavigate: update navigation only if it took place. (Closed)
Patch Set: Addressed comments. Created 4 years, 3 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
« no previous file with comments | « no previous file | testing/buildbot/filters/browser-side-navigation.linux.browser_tests.filter » ('j') | 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 0483c3d0781c3c8393f1c3d29009769c38df48bd..19fc680ad3ce84705ffc15a7d8ecb7120b91f09b 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -3178,7 +3178,11 @@ void RenderFrameImpl::didCreateDataSource(blink::WebLocalFrame* frame,
datasource->setNavigationStartTime(
ConvertToBlinkTime(navigation_state->common_params().navigation_start));
- if (IsBrowserSideNavigationEnabled()) {
+ // PlzNavigate: if an actual navigation took place, inform the datasource of
+ // what happened in the browser.
+ if (IsBrowserSideNavigationEnabled() &&
+ !navigation_state->request_params()
+ .navigation_timing.fetch_start.is_null()) {
// Set timing of several events that happened during navigation.
// They will be used in blink for the Navigation Timing API.
double redirect_start = ConvertToBlinkTime(
« no previous file with comments | « no previous file | testing/buildbot/filters/browser-side-navigation.linux.browser_tests.filter » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698