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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_SAFE_BROWSING_CHROME_PASSWORD_PROTECTION_SERVICE_H_ 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_CHROME_PASSWORD_PROTECTION_SERVICE_H_
6 #define CHROME_BROWSER_SAFE_BROWSING_CHROME_PASSWORD_PROTECTION_SERVICE_H_ 6 #define CHROME_BROWSER_SAFE_BROWSING_CHROME_PASSWORD_PROTECTION_SERVICE_H_
7 7
8 #include "components/safe_browsing/password_protection/password_protection_servi ce.h" 8 #include "components/safe_browsing/password_protection/password_protection_servi ce.h"
9 9
10 class Profile; 10 class Profile;
(...skipping 17 matching lines...) Expand all
28 // Obtains referrer chain of |event_url| and |event_tab_id| and add this 28 // Obtains referrer chain of |event_url| and |event_tab_id| and add this
29 // info into |frame|. 29 // info into |frame|.
30 void FillReferrerChain(const GURL& event_url, 30 void FillReferrerChain(const GURL& event_url,
31 int event_tab_id, 31 int event_tab_id,
32 LoginReputationClientRequest::Frame* frame) override; 32 LoginReputationClientRequest::Frame* frame) override;
33 33
34 bool IsExtendedReporting() override; 34 bool IsExtendedReporting() override;
35 35
36 bool IsIncognito() override; 36 bool IsIncognito() override;
37 37
38 // Checks if Finch config allows sending pings to Safe Browsing backend. 38 // Checks if Finch config allows sending pings to Safe Browsing Server.
39 bool IsPingingEnabled() override; 39 // |feature| should be either kLowReputationPinging or
40 // kProtectedPasswordEntryPinging.
41 bool IsPingingEnabled(const base::Feature& feature) override;
42
43 // If user enabled history syncing.
44 bool IsHistorySyncEnabled() override;
45
46 FRIEND_TEST_ALL_PREFIXES(
47 ChromePasswordProtectionServiceTest,
48 VerifyFinchControlForLowReputationPingSBEROnlyNoIncognito);
49 FRIEND_TEST_ALL_PREFIXES(
50 ChromePasswordProtectionServiceTest,
51 VerifyFinchControlForLowReputationPingSBERAndHistorySyncNoIncognito);
52 FRIEND_TEST_ALL_PREFIXES(ChromePasswordProtectionServiceTest,
53 VerifyFinchControlForLowReputationPingAll);
54 FRIEND_TEST_ALL_PREFIXES(
55 ChromePasswordProtectionServiceTest,
56 VerifyFinchControlForLowReputationPingAllButNoIncognito);
40 57
41 private: 58 private:
59 friend class MockChromePasswordProtectionService;
60 // Default constructor used for tests only.
61 ChromePasswordProtectionService();
42 // Profile associated with this instance. 62 // Profile associated with this instance.
43 Profile* profile_; 63 Profile* profile_;
44 scoped_refptr<SafeBrowsingNavigationObserverManager> 64 scoped_refptr<SafeBrowsingNavigationObserverManager>
45 navigation_observer_manager_; 65 navigation_observer_manager_;
46 DISALLOW_COPY_AND_ASSIGN(ChromePasswordProtectionService); 66 DISALLOW_COPY_AND_ASSIGN(ChromePasswordProtectionService);
47 }; 67 };
48 68
49 } // namespace safe_browsing 69 } // namespace safe_browsing
50 70
51 #endif // CHROME_BROWSER_SAFE_BROWSING_CHROME_PASSWORD_PROTECTION_SERVICE_H_ 71 #endif // CHROME_BROWSER_SAFE_BROWSING_CHROME_PASSWORD_PROTECTION_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698