OLD | NEW |
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_CONSUME
R_H_ | 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_REUSE_DETECTOR_CONSUME
R_H_ |
6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_REUSE_DETECTOR_CONSUME
R_H_ | 6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_REUSE_DETECTOR_CONSUME
R_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
13 | 13 |
14 namespace password_manager { | 14 namespace password_manager { |
15 | 15 |
16 // Callback interface for receiving a password reuse event. | 16 // Callback interface for receiving a password reuse event. |
17 class PasswordReuseDetectorConsumer | 17 class PasswordReuseDetectorConsumer |
18 : public base::SupportsWeakPtr<PasswordReuseDetectorConsumer> { | 18 : public base::SupportsWeakPtr<PasswordReuseDetectorConsumer> { |
19 public: | 19 public: |
20 PasswordReuseDetectorConsumer(); | 20 PasswordReuseDetectorConsumer(); |
21 virtual ~PasswordReuseDetectorConsumer(); | 21 virtual ~PasswordReuseDetectorConsumer(); |
22 | 22 |
23 // Called when a password reuse is found. | 23 // Called when a password reuse is found. |
24 // |legitimate_domain| is the domain on which |password| is saved or the sync | 24 // |legitimate_domain| is the domain on which |password| is saved or |
25 // domain if |password| is a sync password. | 25 // safe_browsing::kChromeSyncDomain if |password| is a sync password. |
26 // |saved_passwords| is total number of passwords stored in Password Manager. | 26 // |saved_passwords| is total number of passwords stored in Password Manager. |
27 // |number_matches| is a number of sites on which |password| is saved. | 27 // |number_matches| is a number of sites on which |password| is saved. |
28 virtual void OnReuseFound(const base::string16& password, | 28 virtual void OnReuseFound(const base::string16& password, |
29 const std::string& legitimate_domain, | 29 const std::string& legitimate_domain, |
30 int saved_passwords, | 30 int saved_passwords, |
31 int number_matches) = 0; | 31 int number_matches) = 0; |
32 }; | 32 }; |
33 | 33 |
34 } // namespace password_manager | 34 } // namespace password_manager |
35 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_REUSE_DETECTOR_CONS
UMER_H_ | 35 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_REUSE_DETECTOR_CONS
UMER_H_ |
OLD | NEW |