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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2762403002: Wire up the ThrottleManager using the existing page activation logic (Closed)
Patch Set: engedy review Created 3 years, 8 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 | « no previous file | chrome/browser/subresource_filter/chrome_subresource_filter_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4e67512d7f4ef0d0ab296883b9d331405cad64fd..4cb2a664de7c6962d33cc303c5a951994dcb40e5 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -147,6 +147,8 @@
#include "components/signin/core/common/profile_management_switches.h"
#include "components/spellcheck/spellcheck_build_features.h"
#include "components/startup_metric_utils/browser/startup_metric_host_impl.h"
+#include "components/subresource_filter/content/browser/content_subresource_filter_driver_factory.h"
+#include "components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.h"
#include "components/task_scheduler_util/browser/initialization.h"
#include "components/task_scheduler_util/common/variations_util.h"
#include "components/translate/core/common/translate_switches.h"
@@ -3471,6 +3473,16 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation(
base::WrapUnique(subresource_filter_activation_throttle));
}
+ // These throttles must come after the
+ // SubresourceFilterSafeBrowsingActivationThrottle.
+ content::WebContents* web_contents = handle->GetWebContents();
+ if (auto* factory =
+ subresource_filter::ContentSubresourceFilterDriverFactory::
+ FromWebContents(web_contents)) {
+ factory->throttle_manager()->MaybeAppendNavigationThrottles(handle,
+ &throttles);
+ }
+
return throttles;
}
« no previous file with comments | « no previous file | chrome/browser/subresource_filter/chrome_subresource_filter_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698