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

Side by Side Diff: chrome/browser/safe_browsing/chrome_password_protection_service.h

Issue 2783773002: Link PasswordProtectionService to Profile and SB Service (Closed)
Patch Set: add a UMA metric to track the number of cached verdict before shutdown Created 3 years, 8 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
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698