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

Unified Diff: chrome/browser/subresource_filter/navigation_throttle_util.cc

Issue 2834543003: [subresource_filter] SB throttle can send multiple speculative requests. (Closed)
Patch Set: add cancelling navigation throttle 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
Index: chrome/browser/subresource_filter/navigation_throttle_util.cc
diff --git a/chrome/browser/subresource_filter/navigation_throttle_util.cc b/chrome/browser/subresource_filter/navigation_throttle_util.cc
index d5a6fc1cbdd83b4406bbe334a8d54fe943e33502..3cfd9fcefae75406f93fb477b2e49f0e6d884ca7 100644
--- a/chrome/browser/subresource_filter/navigation_throttle_util.cc
+++ b/chrome/browser/subresource_filter/navigation_throttle_util.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/subresource_filter/navigation_throttle_util.h"
+#include "base/memory/ptr_util.h"
+#include "base/timer/timer.h"
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
#include "components/safe_browsing_db/database_manager.h"
#include "components/safe_browsing_db/v4_feature_list.h"
@@ -20,7 +22,10 @@ content::NavigationThrottle* MaybeCreateSubresourceFilterNavigationThrottle(
safe_browsing::V4FeatureList::V4UsageStatus::V4_ONLY) {
return new subresource_filter::
SubresourceFilterSafeBrowsingActivationThrottle(
- navigation_handle, safe_browsing_service->database_manager());
+ navigation_handle,
+ base::MakeUnique<base::Timer>(false /* retain_user_task */,
+ false /* repeating */),
+ safe_browsing_service->database_manager());
}
return nullptr;
}

Powered by Google App Engine
This is Rietveld 408576698