OLD | NEW |
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; |
11 | 11 |
12 namespace safe_browsing { | 12 namespace safe_browsing { |
13 | 13 |
14 class SafeBrowsingService; | 14 class SafeBrowsingService; |
15 class SafeBrowsingNavigationObserverManager; | 15 class SafeBrowsingNavigationObserverManager; |
16 | 16 |
17 // ChromePasswordProtectionService extends PasswordProtectionService by adding | 17 // ChromePasswordProtectionService extends PasswordProtectionService by adding |
18 // access to SafeBrowsingNaivigationObserverManager and Profile. | 18 // access to SafeBrowsingNaivigationObserverManager and Profile. |
19 class ChromePasswordProtectionService : public PasswordProtectionService { | 19 class ChromePasswordProtectionService : public PasswordProtectionService { |
20 public: | 20 public: |
21 ChromePasswordProtectionService(SafeBrowsingService* sb_service, | 21 ChromePasswordProtectionService(SafeBrowsingService* sb_service, |
22 Profile* profile); | 22 Profile* profile); |
| 23 |
23 ~ChromePasswordProtectionService() override; | 24 ~ChromePasswordProtectionService() override; |
24 | 25 |
25 protected: | 26 protected: |
26 // PasswordProtectionService overrides. | 27 // PasswordProtectionService overrides. |
27 // 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 |
28 // info into |frame|. | 29 // info into |frame|. |
29 void FillReferrerChain(const GURL& event_url, | 30 void FillReferrerChain(const GURL& event_url, |
30 int event_tab_id, | 31 int event_tab_id, |
31 LoginReputationClientRequest::Frame* frame) override; | 32 LoginReputationClientRequest::Frame* frame) override; |
32 | 33 |
33 bool IsExtendedReporting() override; | 34 bool IsExtendedReporting() override; |
34 | 35 |
35 bool IsIncognito() override; | 36 bool IsIncognito() override; |
36 | 37 |
37 // Checks if Finch config allows sending pings to Safe Browsing backend. | 38 // Checks if Finch config allows sending pings to Safe Browsing backend. |
38 bool IsPingingEnabled() override; | 39 bool IsPingingEnabled() override; |
39 | 40 |
40 private: | 41 private: |
41 // Profile associated with this instance. | 42 // Profile associated with this instance. |
42 Profile* profile_; | 43 Profile* profile_; |
43 scoped_refptr<SafeBrowsingNavigationObserverManager> | 44 scoped_refptr<SafeBrowsingNavigationObserverManager> |
44 navigation_observer_manager_; | 45 navigation_observer_manager_; |
45 DISALLOW_COPY_AND_ASSIGN(ChromePasswordProtectionService); | 46 DISALLOW_COPY_AND_ASSIGN(ChromePasswordProtectionService); |
46 }; | 47 }; |
47 | 48 |
48 } // namespace safe_browsing | 49 } // namespace safe_browsing |
49 | 50 |
50 #endif // CHROME_BROWSER_SAFE_BROWSING_CHROME_PASSWORD_PROTECTION_SERVICE_H_ | 51 #endif // CHROME_BROWSER_SAFE_BROWSING_CHROME_PASSWORD_PROTECTION_SERVICE_H_ |
OLD | NEW |