Index: components/password_manager/core/browser/password_reuse_detector.h |
diff --git a/components/password_manager/core/browser/password_reuse_detector.h b/components/password_manager/core/browser/password_reuse_detector.h |
index 91b2bdbfa8cdbd25170c734a663ffab56eb170ae..e95940c95df4025d6a6f732f18d85ce55ef30871 100644 |
--- a/components/password_manager/core/browser/password_reuse_detector.h |
+++ b/components/password_manager/core/browser/password_reuse_detector.h |
@@ -13,6 +13,7 @@ |
#include "base/macros.h" |
#include "base/strings/string16.h" |
+#include "components/password_manager/core/browser/password_store_change.h" |
#include "components/password_manager/core/browser/password_store_consumer.h" |
namespace password_manager { |
@@ -20,6 +21,7 @@ namespace password_manager { |
// Callback interface for receiving a password reuse event. |
class PasswordReuseDetectorConsumer { |
public: |
+ virtual ~PasswordReuseDetectorConsumer() = default; |
// Called when a password reuse is found. |
vabr (Chromium)
2016/12/20 18:11:44
nit: Add a blank line between lines 24 and 25.
dvadym
2016/12/21 12:15:35
Done.
|
// |saved_domain| is the domain on which |password| is saved. |
virtual void OnReuseFound(const base::string16& password, |
@@ -40,6 +42,9 @@ class PasswordReuseDetector : public PasswordStoreConsumer { |
void OnGetPasswordStoreResults( |
std::vector<std::unique_ptr<autofill::PasswordForm>> results) override; |
+ // Add new or updated passwords from |changes| to internal password index. |
+ void OnLoginsChanged(const PasswordStoreChangeList& changes); |
+ |
// Checks that some suffix of |input| equals to a password saved on another |
// registry controlled domain than |domain|. |
// If such suffix is found, |consumer|->OnReuseFound() is called on the same |
@@ -50,6 +55,9 @@ class PasswordReuseDetector : public PasswordStoreConsumer { |
PasswordReuseDetectorConsumer* consumer); |
private: |
+ // Add password from |form| to |passwords_|. |
+ void AddPassword(const autofill::PasswordForm& form); |
+ |
// Contains all passwords. |
// A key is a password. |
// A value is a set of registry controlled domains on which the password |