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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2762403002: Wire up the ThrottleManager using the existing page activation logic (Closed)
Patch Set: small tweaks Created 3 years, 9 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 8c60f67b8653d464d5f1e2177f0e4b642cf4226e..bb3e026f1a9fdd7b018dc7bd9c2ece0f8612d3bb 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"
@@ -3453,6 +3455,15 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation(
base::WrapUnique(subresource_filter_activation_throttle));
}
+ // These throttles must come after the SubresourceFilterNavigationThrottle.
pkalinnikov 2017/04/03 13:40:07 nit: Should this be SubresourceFilterSafeBrowsingA
Charlie Harrison 2017/04/03 15:33:31 Yes, done. Let me fix the naming of the function i
+ content::WebContents* web_contents = handle->GetWebContents();
+ if (auto* factory =
+ subresource_filter::ContentSubresourceFilterDriverFactory::
+ FromWebContents(web_contents)) {
+ factory->throttle_manager()->MaybeAppendNavigationThrottles(handle,
+ &throttles);
+ }
+
return throttles;
}

Powered by Google App Engine
This is Rietveld 408576698