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

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: nit 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 #include "base/feature_list.h"
Nathan Parker 2017/03/30 21:38:12 I think this can be moved to the .cc file
Jialiu Lin 2017/03/30 23:23:04 indeed. Done.
11
12 class Profile;
13
14 namespace safe_browsing {
15
16 class SafeBrowsingService;
17 class SafeBrowsingNavigationObserverManager;
18
19 // ChromePasswordProtectionService extends PasswordProtectionService by adding
20 // access to SafeBrowsingNaivigationObserverManager and Profile.
21 class ChromePasswordProtectionService : public PasswordProtectionService {
22 public:
23 static const base::Feature kPasswordProtectionPingOnly;
24
25 ChromePasswordProtectionService(SafeBrowsingService* sb_service,
26 Profile* profile);
27 ~ChromePasswordProtectionService() override;
28
29 // PasswordProtectionService overrides.
30 // Obtains referrer chain of |event_url| and |event_tab_id| and add this
31 // info into |frame|.
32 void FillReferrerChain(const GURL& event_url,
33 int event_tab_id,
34 LoginReputationClientRequest::Frame* frame) override;
35
36 bool IsExtendedReporting() override;
37
38 bool IsIncognito() override;
39
40 // Checks if Finch config allows sending pings to Safe Browsing backend.
41 bool IsPingingEnabled() override;
42
43 private:
44 // Profile associated with instance.
Nathan Parker 2017/03/30 21:38:12 Profile expected to outlive this class, yes?
Jialiu Lin 2017/03/30 23:23:04 Yes. Its creation is triggered by profile creation
45 Profile* profile_;
46 scoped_refptr<SafeBrowsingNavigationObserverManager>
47 navigation_observer_manager_;
48 DISALLOW_COPY_AND_ASSIGN(ChromePasswordProtectionService);
49 };
50
51 } // namespace safe_browsing
52
53 #endif // CHROME_BROWSER_SAFE_BROWSING_CHROME_PASSWORD_PROTECTION_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698