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

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

Issue 2675063002: Browser tests for using the new SafeBrowsing protocol (v4) (Closed)
Patch Set: Simplify V4DB creation in product code and tests 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..e201aec73bc6a742f841050f04c88b04bb974644 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.h
+++ b/chrome/browser/safe_browsing/safe_browsing_service.h
@@ -197,7 +197,8 @@ class SafeBrowsingService : public base::RefCountedThreadSafe<
protected:
// Creates the safe browsing service. Need to initialize before using.
- SafeBrowsingService();
+ explicit SafeBrowsingService(bool v4_enabled = false,
+ bool use_v4_only = false);
Scott Hess - ex-Googler 2017/02/06 22:46:35 This feels like a case where some well-chosen enum
vakh (use Gerrit instead) 2017/02/06 23:30:12 Done.
~SafeBrowsingService() override;
@@ -298,7 +299,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

Powered by Google App Engine
This is Rietveld 408576698