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

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

Issue 2735183003: PlzNavigate: stop navigations when opening a document for write (Closed)
Patch Set: Addressed commemts Created 3 years, 9 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/navigation_request.cc
diff --git a/content/browser/frame_host/navigation_request.cc b/content/browser/frame_host/navigation_request.cc
index 759ab5e1b0ab78778220c8be86a02b2772a11971..b6356c7f3e30d6c706cb09e83e0fdb7da9ac38f8 100644
--- a/content/browser/frame_host/navigation_request.cc
+++ b/content/browser/frame_host/navigation_request.cc
@@ -480,7 +480,7 @@ void NavigationRequest::OnRequestRedirected(
// FilterURL sets the URL to about:blank if the CSP checks prevent the
// renderer from accessing it.
if ((url == url::kAboutBlankURL) && (url != common_params_.url)) {
- frame_tree_node_->ResetNavigationRequest(false);
+ frame_tree_node_->ResetNavigationRequest(false, true);
return;
}
}
@@ -559,7 +559,7 @@ void NavigationRequest::OnResponseStarted(
// TODO(clamy): Rename ShouldTransferNavigation once PlzNavigate ships.
if (!frame_tree_node_->navigator()->GetDelegate()->ShouldTransferNavigation(
frame_tree_node_->IsMainFrame())) {
- frame_tree_node_->ResetNavigationRequest(false);
+ frame_tree_node_->ResetNavigationRequest(false, true);
return;
}
}
@@ -598,7 +598,7 @@ void NavigationRequest::OnRequestFailed(bool has_stale_copy_in_cache,
// If the request was canceled by the user do not show an error page.
if (net_error == net::ERR_ABORTED) {
- frame_tree_node_->ResetNavigationRequest(false);
+ frame_tree_node_->ResetNavigationRequest(false, true);
return;
}
@@ -833,7 +833,7 @@ void NavigationRequest::CommitNavigation() {
common_params_, request_params_,
is_view_source_);
- frame_tree_node_->ResetNavigationRequest(true);
+ frame_tree_node_->ResetNavigationRequest(true, true);
}
} // namespace content
« no previous file with comments | « content/browser/frame_host/navigation_controller_impl_unittest.cc ('k') | content/browser/frame_host/navigator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698