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

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

Issue 1048463004: PlzNavigate: track pending commits (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments + rebase on top of 1088933003 Created 5 years, 8 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/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 d38f2b35cce2bd8ccc1dcb9ddbb6823e3d6c0b41..e5a470fab7ad7bb030aaf39b48431b305f7411d5 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -151,6 +151,7 @@ RenderFrameHostImpl::RenderFrameHostImpl(SiteInstance* site_instance,
is_waiting_for_beforeunload_ack_(false),
unload_ack_is_for_navigation_(false),
is_loading_(false),
+ pending_commit_(false),
accessibility_reset_token_(0),
accessibility_reset_count_(0),
no_create_browser_accessibility_manager_for_testing_(false),
@@ -842,6 +843,12 @@ void RenderFrameHostImpl::OnDidCommitProvisionalLoad(const IPC::Message& msg) {
accessibility_reset_count_ = 0;
frame_tree_node()->navigator()->DidNavigate(this, validated_params);
+
+ // PlzNavigate
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableBrowserSideNavigation)) {
+ pending_commit_ = false;
+ }
}
void RenderFrameHostImpl::OnDidDropNavigation() {
@@ -1739,6 +1746,7 @@ void RenderFrameHostImpl::CommitNavigation(
// TODO(clamy): Release the stream handle once the renderer has finished
// reading it.
stream_handle_ = body.Pass();
+ pending_commit_ = true;
}
void RenderFrameHostImpl::FailedNavigation(

Powered by Google App Engine
This is Rietveld 408576698