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

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: rebase 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..77bbc2fefeccffc4840389a055465301288b59a8 100644
--- a/chrome/browser/safe_browsing/chrome_password_protection_service.h
+++ b/chrome/browser/safe_browsing/chrome_password_protection_service.h
@@ -35,10 +35,30 @@ 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.
+ // |feature| should be either kLowReputationPinging or
+ // kProtectedPasswordEntryPinging.
+ bool IsPingingEnabled(const base::Feature& feature) override;
+
+ // If user enabled history syncing.
+ bool IsHistorySyncEnabled() override;
+
+ FRIEND_TEST_ALL_PREFIXES(
+ ChromePasswordProtectionServiceTest,
+ VerifyFinchControlForLowReputationPingSBEROnlyNoIncognito);
+ FRIEND_TEST_ALL_PREFIXES(
+ ChromePasswordProtectionServiceTest,
+ VerifyFinchControlForLowReputationPingSBERAndHistorySyncNoIncognito);
+ FRIEND_TEST_ALL_PREFIXES(ChromePasswordProtectionServiceTest,
+ VerifyFinchControlForLowReputationPingAll);
+ FRIEND_TEST_ALL_PREFIXES(
+ ChromePasswordProtectionServiceTest,
+ VerifyFinchControlForLowReputationPingAllButNoIncognito);
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