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

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

Issue 2856033002: Add finch control of user population in low reputation requests (Closed)
Patch Set: replace PasswordReuse with ProtectedPasswordEntry Created 3 years, 7 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/chrome_password_protection_service.h
diff --git a/chrome/browser/safe_browsing/chrome_password_protection_service.h b/chrome/browser/safe_browsing/chrome_password_protection_service.h
index 4124c865e766d7fd33a55d3083c9523e5f5608d3..9c1216bf5ad1efa10c5ad5d17826f949b8e173dd 100644
--- a/chrome/browser/safe_browsing/chrome_password_protection_service.h
+++ b/chrome/browser/safe_browsing/chrome_password_protection_service.h
@@ -24,6 +24,14 @@ class ChromePasswordProtectionService : public PasswordProtectionService {
~ChromePasswordProtectionService() override;
protected:
+ FRIEND_TEST_ALL_PREFIXES(
Nathan Parker 2017/05/05 20:58:21 nit: put these at the end of the protected (or pri
Jialiu Lin 2017/05/05 22:19:32 Done.
+ ChromePasswordProtectionServiceTest,
+ VerifyFinchControlForLowReputationPingSBEROnlyNoIncognito);
+ FRIEND_TEST_ALL_PREFIXES(
+ ChromePasswordProtectionServiceTest,
+ VerifyFinchControlForLowReputationPingSBERAndHistorySyncNoIncognito);
+ FRIEND_TEST_ALL_PREFIXES(ChromePasswordProtectionServiceTest,
+ VerifyFinchControlForLowReputationPingAll);
// PasswordProtectionService overrides.
// Obtains referrer chain of |event_url| and |event_tab_id| and add this
// info into |frame|.
@@ -35,10 +43,16 @@ class ChromePasswordProtectionService : public PasswordProtectionService {
bool IsIncognito() override;
- // Checks if Finch config allows sending pings to Safe Browsing backend.
- bool IsPingingEnabled() override;
+ // Checks if Finch config allows sending pings to Safe Browsing Server.
+ bool IsPingingEnabled(const base::Feature& feature) override;
Nathan Parker 2017/05/05 20:58:21 What is |feature| here? Maybe add a comment or na
Jialiu Lin 2017/05/05 22:19:32 Feature can be either kLowReputationPinging or kPr
+
+ // If user enabled history syncing.
+ bool IsHistorySyncEnabled() override;
private:
+ friend class MockChromePasswordProtectionService;
+ // Default constructor used for tests only.
+ ChromePasswordProtectionService();
// Profile associated with this instance.
Profile* profile_;
scoped_refptr<SafeBrowsingNavigationObserverManager>

Powered by Google App Engine
This is Rietveld 408576698