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

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

Issue 789643005: PlzNavigate: make content unit tests work with browser side navigation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cancel-navigations
Patch Set: Added a static method to create NavigationRequests Created 5 years, 11 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_manager.cc
diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc
index b36562c7f81320ac7bf6a218b45e3cc133bff27a..1501432b0263d6769e1d351e38f74995fb4c3729 100644
--- a/content/browser/frame_host/render_frame_host_manager.cc
+++ b/content/browser/frame_host/render_frame_host_manager.cc
@@ -281,7 +281,7 @@ bool RenderFrameHostManager::ShouldCloseTabOnUnresponsiveRenderer() {
// If the tab becomes unresponsive during beforeunload while doing a
// cross-site navigation, proceed with the navigation. (This assumes that
// the pending RenderFrameHost is still responsive.)
- if (render_frame_host_->is_waiting_for_beforeunload_ack()) {
+ if (render_frame_host_->IsWaitingForBeforeUnloadACK()) {
// Haven't gotten around to starting the request, because we're still
// waiting for the beforeunload handler to finish. We'll pretend that it
// did finish, to let the navigation proceed. Note that there's a danger
@@ -460,7 +460,6 @@ void RenderFrameHostManager::DidNavigateFrame(
if (render_frame_host == pending_render_frame_host_) {
// The pending cross-site navigation completed, so show the renderer.
CommitPending();
- cross_navigation_pending_ = false;
} else if (render_frame_host == render_frame_host_) {
if (was_caused_by_user_gesture) {
// A navigation in the original page has taken place. Cancel the pending
@@ -737,6 +736,7 @@ RenderFrameHostImpl* RenderFrameHostManager::GetFrameHostForNavigation(
}
}
+ cross_navigation_pending_ = navigation_rfh != render_frame_host_.get();
nasko 2015/01/21 17:21:33 nit: If cross_navigation_pending_ is not used for
clamy 2015/01/21 19:39:41 Yes, but it is checked by a certain number of test
nasko 2015/01/21 19:47:06 Then the comment that it isn't used in PlzNavigate
return navigation_rfh;
}
@@ -1461,6 +1461,7 @@ int RenderFrameHostManager::GetRoutingIdForSiteInstance(
void RenderFrameHostManager::CommitPending() {
TRACE_EVENT1("navigation", "RenderFrameHostManager::CommitPending",
"FrameTreeNode id", frame_tree_node_->frame_tree_node_id());
+ cross_navigation_pending_ = false;
nasko 2015/01/21 17:21:33 nit: I'd move this down to where we actually swap
clamy 2015/01/21 19:39:41 Done.
bool browser_side_navigation =
base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableBrowserSideNavigation);

Powered by Google App Engine
This is Rietveld 408576698