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

Unified Diff: chrome/browser/safe_browsing/safe_browsing_service.h

Issue 2675063002: Browser tests for using the new SafeBrowsing protocol (v4) (Closed)
Patch Set: Use ANNOTATE_LEAKING_OBJECT_PTR Created 3 years, 10 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/safe_browsing/safe_browsing_service.h
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.h b/chrome/browser/safe_browsing/safe_browsing_service.h
index d1d355499100f56654c773e772e1a2d32068da10..e381f7a555ed42df2bad007ce9b78ad172ef9347 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.h
+++ b/chrome/browser/safe_browsing/safe_browsing_service.h
@@ -22,6 +22,7 @@
#include "chrome/browser/safe_browsing/services_delegate.h"
#include "components/safe_browsing_db/safe_browsing_prefs.h"
#include "components/safe_browsing_db/util.h"
+#include "components/safe_browsing_db/v4_feature_list.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
@@ -197,7 +198,8 @@ class SafeBrowsingService : public base::RefCountedThreadSafe<
protected:
// Creates the safe browsing service. Need to initialize before using.
- SafeBrowsingService();
+ SafeBrowsingService(V4FeatureList::V4UsageStatus v4_usage_status =
+ V4FeatureList::V4UsageStatus::V4_DISABLED);
~SafeBrowsingService() override;
@@ -298,7 +300,12 @@ class SafeBrowsingService : public base::RefCountedThreadSafe<
// Whether SafeBrowsing needs to be enabled in V4Only mode. In this mode, all
// SafeBrowsing decisions are made using the PVer4 implementation.
- bool enabled_v4_only_;
+ bool use_v4_only_;
+
+ // Whether the PVer4 implementation needs to be instantiated. Note that even
+ // if the PVer4 implementation has been instantiated, it is used only if
+ // |use_v4_only_| is true.
+ bool v4_enabled_;
// Tracks existing PrefServices, and the safe browsing preference on each.
// This is used to determine if any profile is currently using the safe
« no previous file with comments | « chrome/browser/loader/safe_browsing_resource_throttle.cc ('k') | chrome/browser/safe_browsing/safe_browsing_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698