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

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

Issue 2584513003: PlzNavigate: identify same-page browser-initiated navigation. (Closed)
Patch Set: Addressed comments (@clamy). Created 4 years 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/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 07fc76005bd703b1b9a19dadc775e921fefab82b..433c0d4e53c8504411da8ca28fc6e08e494bc018 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -2557,6 +2557,7 @@ void RenderFrameHostImpl::CommitNavigation(
DCHECK((response && body.get()) ||
common_params.url.SchemeIs(url::kDataScheme) ||
!ShouldMakeNetworkRequestForURL(common_params.url) ||
+ request_params.is_same_document_navigation ||
IsRendererDebugURL(common_params.url));
UpdatePermissionsForNavigation(common_params, request_params);
@@ -2579,8 +2580,10 @@ void RenderFrameHostImpl::CommitNavigation(
request_params));
// If a network request was made, update the LoFi state.
- if (ShouldMakeNetworkRequestForURL(common_params.url))
+ if (ShouldMakeNetworkRequestForURL(common_params.url) &&
+ !request_params.is_same_document_navigation) {
last_navigation_lofi_state_ = common_params.lofi_state;
+ }
// TODO(clamy): Release the stream handle once the renderer has finished
// reading it.

Powered by Google App Engine
This is Rietveld 408576698