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

Side by Side Diff: components/password_manager/core/browser/password_reuse_detector.h

Issue 2912383004: Fill is_chrome_signin_password field in the password entry pings. (Closed)
Patch Set: address nparker's comments Created 3 years, 6 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_REUSE_DETECTOR_H_ 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_REUSE_DETECTOR_H_
6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_REUSE_DETECTOR_H_ 6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_REUSE_DETECTOR_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <map> 9 #include <map>
10 #include <memory> 10 #include <memory>
(...skipping 11 matching lines...) Expand all
22 22
23 namespace password_manager { 23 namespace password_manager {
24 24
25 class PasswordReuseDetectorConsumer; 25 class PasswordReuseDetectorConsumer;
26 26
27 // Comparator that compares reversed strings. 27 // Comparator that compares reversed strings.
28 struct ReverseStringLess { 28 struct ReverseStringLess {
29 bool operator()(const base::string16& lhs, const base::string16& rhs) const; 29 bool operator()(const base::string16& lhs, const base::string16& rhs) const;
30 }; 30 };
31 31
32 // Used to identify chrome sync password in password entry event.
33 extern const char kSyncPasswordDomain[];
34
32 // Per-profile class responsible for detection of password reuse, i.e. that the 35 // Per-profile class responsible for detection of password reuse, i.e. that the
33 // user input on some site contains the password saved on another site. 36 // user input on some site contains the password saved on another site.
34 // It receives saved passwords through PasswordStoreConsumer interface. 37 // It receives saved passwords through PasswordStoreConsumer interface.
35 // It stores passwords in memory and CheckReuse() can be used for finding 38 // It stores passwords in memory and CheckReuse() can be used for finding
36 // a password reuse. 39 // a password reuse.
37 class PasswordReuseDetector : public PasswordStoreConsumer { 40 class PasswordReuseDetector : public PasswordStoreConsumer {
38 public: 41 public:
39 explicit PasswordReuseDetector(PrefService* prefs); 42 explicit PasswordReuseDetector(PrefService* prefs);
40 ~PasswordReuseDetector() override; 43 ~PasswordReuseDetector() override;
41 44
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 101
99 base::Optional<uint64_t> sync_password_hash_; 102 base::Optional<uint64_t> sync_password_hash_;
100 PrefService* const prefs_; 103 PrefService* const prefs_;
101 104
102 DISALLOW_COPY_AND_ASSIGN(PasswordReuseDetector); 105 DISALLOW_COPY_AND_ASSIGN(PasswordReuseDetector);
103 }; 106 };
104 107
105 } // namespace password_manager 108 } // namespace password_manager
106 109
107 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_REUSE_DETECTOR_H_ 110 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_REUSE_DETECTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698