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

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

Issue 2380193003: Block navigations in extensions via ShouldTransferNavigation (not via OpenURL). (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « content/browser/cross_site_transfer_browsertest.cc ('k') | content/browser/frame_host/navigator_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0063419c0d590cdd5ff28b10edd68ed974da3c75..2f836ba005a4ac2e2e95f2734cde18ea4e855c8e 100644
--- a/content/browser/frame_host/navigation_request.cc
+++ b/content/browser/frame_host/navigation_request.cc
@@ -320,9 +320,8 @@ void NavigationRequest::OnResponseStarted(
// renderer, allow the embedder to cancel the transfer.
if (!browser_initiated_ &&
render_frame_host != frame_tree_node_->current_frame_host() &&
- !frame_tree_node_->navigator()
- ->GetDelegate()
- ->ShouldTransferNavigation()) {
+ !frame_tree_node_->navigator()->GetDelegate()->ShouldTransferNavigation(
+ frame_tree_node_->IsMainFrame())) {
frame_tree_node_->ResetNavigationRequest(false);
return;
}
« no previous file with comments | « content/browser/cross_site_transfer_browsertest.cc ('k') | content/browser/frame_host/navigator_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698