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

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

Issue 2377833002: Block navigations in extensions via ShouldTransferNavigation (not via OpenURL). (Closed)
Patch Set: Add missing files under chrome/test/data/extensions/api_test/browser_action/popup_with_form/ 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
Index: content/browser/frame_host/navigator_impl.cc
diff --git a/content/browser/frame_host/navigator_impl.cc b/content/browser/frame_host/navigator_impl.cc
index aafb3ccf81508df561e9f0a237dabc2fa32f8c33..460434b9249f36ef936a1d9eee91547da39728dd 100644
--- a/content/browser/frame_host/navigator_impl.cc
+++ b/content/browser/frame_host/navigator_impl.cc
@@ -756,7 +756,8 @@ void NavigatorImpl::RequestTransferURL(
SiteIsolationPolicy::AreCrossProcessFramesPossible());
// Allow the delegate to cancel the transfer.
- if (!delegate_->ShouldTransferNavigation())
+ if (!delegate_->ShouldTransferNavigation(
+ render_frame_host->frame_tree_node()->IsMainFrame()))
return;
GURL dest_url(url);

Powered by Google App Engine
This is Rietveld 408576698