Index: extensions/browser/extension_navigation_throttle.cc |
diff --git a/extensions/browser/extension_navigation_throttle.cc b/extensions/browser/extension_navigation_throttle.cc |
index 37ead6b0182a5c7869ac4802805a5671b8542f09..9412f16d6ef98f342a477e7b81046a69956b38f6 100644 |
--- a/extensions/browser/extension_navigation_throttle.cc |
+++ b/extensions/browser/extension_navigation_throttle.cc |
@@ -32,7 +32,7 @@ ExtensionNavigationThrottle::ExtensionNavigationThrottle( |
ExtensionNavigationThrottle::~ExtensionNavigationThrottle() {} |
content::NavigationThrottle::ThrottleCheckResult |
-ExtensionNavigationThrottle::WillStartRequest() { |
+ExtensionNavigationThrottle::WillStartOrRedirectRequest() { |
DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
content::WebContents* web_contents = navigation_handle()->GetWebContents(); |
ExtensionRegistry* registry = |
@@ -153,6 +153,22 @@ ExtensionNavigationThrottle::WillStartRequest() { |
return content::NavigationThrottle::PROCEED; |
} |
+content::NavigationThrottle::ThrottleCheckResult |
+ExtensionNavigationThrottle::WillStartRequest() { |
+ return WillStartOrRedirectRequest(); |
+} |
+ |
+content::NavigationThrottle::ThrottleCheckResult |
+ExtensionNavigationThrottle::WillRedirectRequest() { |
+ ThrottleCheckResult result = WillStartOrRedirectRequest(); |
+ if (result == BLOCK_REQUEST) { |
+ // TODO(nick): https://crbug.com/695421 means that BLOCK_REQUEST does not |
+ // work here. Once PlzNavigate is enabled 100%, just return |result|. |
+ return CANCEL; |
+ } |
+ return result; |
+} |
+ |
const char* ExtensionNavigationThrottle::GetNameForLogging() { |
return "ExtensionNavigationThrottle"; |
} |