| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_CHROME_PASSWORD_PROTECTION_SERVICE_H_ |
| 6 #define CHROME_BROWSER_SAFE_BROWSING_CHROME_PASSWORD_PROTECTION_SERVICE_H_ |
| 7 |
| 8 #include "components/safe_browsing/password_protection/password_protection_servi
ce.h" |
| 9 |
| 10 class Profile; |
| 11 |
| 12 namespace base { |
| 13 struct Feature; |
| 14 } |
| 15 |
| 16 namespace safe_browsing { |
| 17 |
| 18 class SafeBrowsingService; |
| 19 class SafeBrowsingNavigationObserverManager; |
| 20 |
| 21 // ChromePasswordProtectionService extends PasswordProtectionService by adding |
| 22 // access to SafeBrowsingNaivigationObserverManager and Profile. |
| 23 class ChromePasswordProtectionService : public PasswordProtectionService { |
| 24 public: |
| 25 static const base::Feature kPasswordProtectionPingOnly; |
| 26 |
| 27 ChromePasswordProtectionService(SafeBrowsingService* sb_service, |
| 28 Profile* profile); |
| 29 ~ChromePasswordProtectionService() override; |
| 30 |
| 31 // PasswordProtectionService overrides. |
| 32 // Obtains referrer chain of |event_url| and |event_tab_id| and add this |
| 33 // info into |frame|. |
| 34 void FillReferrerChain(const GURL& event_url, |
| 35 int event_tab_id, |
| 36 LoginReputationClientRequest::Frame* frame) override; |
| 37 |
| 38 bool IsExtendedReporting() override; |
| 39 |
| 40 bool IsIncognito() override; |
| 41 |
| 42 // Checks if Finch config allows sending pings to Safe Browsing backend. |
| 43 bool IsPingingEnabled() override; |
| 44 |
| 45 private: |
| 46 // Profile associated with this instance. |
| 47 Profile* profile_; |
| 48 scoped_refptr<SafeBrowsingNavigationObserverManager> |
| 49 navigation_observer_manager_; |
| 50 DISALLOW_COPY_AND_ASSIGN(ChromePasswordProtectionService); |
| 51 }; |
| 52 |
| 53 } // namespace safe_browsing |
| 54 |
| 55 #endif // CHROME_BROWSER_SAFE_BROWSING_CHROME_PASSWORD_PROTECTION_SERVICE_H_ |
| OLD | NEW |