Index: chrome/browser/chrome_content_browser_client.cc |
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc |
index bff38f9611425162fafc5835612906d973cb3080..53ed1cef63402f08b1da9ccdaf11af04290863fc 100644 |
--- a/chrome/browser/chrome_content_browser_client.cc |
+++ b/chrome/browser/chrome_content_browser_client.cc |
@@ -2528,7 +2528,13 @@ bool ChromeContentBrowserClient::CanCreateWindow( |
} |
#endif |
- if (!user_gesture && |
+ auto* driver_factory = subresource_filter:: |
+ ContentSubresourceFilterDriverFactory::FromWebContents(web_contents); |
+ const bool popup_block_candidate = |
+ !user_gesture || |
+ (driver_factory && |
+ driver_factory->throttle_manager()->ShouldDisallowNewWindow()); |
+ if (popup_block_candidate && |
!base::CommandLine::ForCurrentProcess()->HasSwitch( |
switches::kDisablePopupBlocking)) { |
if (content_settings->GetContentSetting( |