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

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: Removed other occurences of main_test_rfh 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 5df06c417d4ccd324a7c315ae88fb1fe1c15c1c5..fae00d8950ac3a3d9dfcc6bbd5e129e4f587eb5e 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),
@@ -848,6 +849,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() {
@@ -1784,6 +1791,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