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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2060313002: Navigation throttle for the Safe Browsing Subresource Filter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pre-tab-activation
Patch Set: Navigation throttle for the Safe Browsing Subresource Filter. Created 4 years, 6 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: 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 710f5b5b500e9523f2147f14b1cb323231912f7e..f7bcb4d69a574036d83385a75fd3c2a1d8e0b481 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -131,6 +131,7 @@
#include "components/security_interstitials/core/ssl_error_ui.h"
#include "components/signin/core/common/profile_management_switches.h"
#include "components/startup_metric_utils/browser/startup_metric_host_impl.h"
+#include "components/subresource_filter/content/browser/subresource_filter_navigation_throttle.h"
#include "components/translate/core/common/translate_switches.h"
#include "components/url_formatter/url_fixer.h"
#include "components/variations/variations_associated_data.h"
@@ -2881,6 +2882,12 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation(
throttles.push_back(new extensions::ExtensionNavigationThrottle(handle));
#endif
+ if (handle->IsInMainFrame() && handle->GetURL().SchemeIsHTTPOrHTTPS()) {
+ throttles.push_back(
+ subresource_filter::SubresourceFilterNavigationThrottle::Create(
+ handle));
+ }
+
return throttles;
}
« no previous file with comments | « no previous file | components/subresource_filter/content/browser/BUILD.gn » ('j') | content/public/browser/navigation_handle.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698