Index: components/password_manager/core/browser/password_form_manager.h |
diff --git a/components/password_manager/core/browser/password_form_manager.h b/components/password_manager/core/browser/password_form_manager.h |
index b46cfe45a4616920663c8234baf3784c8e30fcd8..86cee69f044a641ea6730919345db83b1f6af655 100644 |
--- a/components/password_manager/core/browser/password_form_manager.h |
+++ b/components/password_manager/core/browser/password_form_manager.h |
@@ -182,6 +182,10 @@ class PasswordFormManager : public PasswordStoreConsumer { |
bool password_overridden() const { return password_overridden_; } |
+ bool retry_password_form_password_update() const { |
+ return retry_password_form_password_update_; |
+ } |
+ |
// Called if the user could generate a password for this form. |
void MarkGenerationAvailable() { generation_available_ = true; } |
@@ -411,6 +415,15 @@ class PasswordFormManager : public PasswordStoreConsumer { |
autofill::PasswordForm* FindBestMatchForUpdatePassword( |
const base::string16& password) const; |
+ // Try to find best matched to |form| from |best_matches_| by the rules: |
+ // 1. If there is an element in |best_matches_| with the same username then |
+ // return it; |
+ // 2. If |form| has no username and there is an element from |best_matches_| |
+ // with the same password as in |form| then return it; |
+ // 3. Otherwise return nullptr. |
+ autofill::PasswordForm* FindBestSavedMatch( |
+ const autofill::PasswordForm* form) const; |
+ |
// Set of nonblacklisted PasswordForms from the DB that best match the form |
// being managed by this. Use a map instead of vector, because we most |
// frequently require lookups by username value in IsNewLogin. |
@@ -454,6 +467,13 @@ class PasswordFormManager : public PasswordStoreConsumer { |
// Whether the saved password was overridden. |
bool password_overridden_; |
+ // A form is considered to be "retry" password if it has only one field which |
+ // is a current password field. |
+ // This variable is true if the password passed through ProvisionallySave() is |
+ // a password that is not equal to any password from stored for this origin |
vabr (Chromium)
2015/11/26 17:10:37
nit: equal to -> part of
(password and form are di
vabr (Chromium)
2015/11/26 17:10:37
typo: from -> form
|
+ // credentials and it was entered on a retry password form. |
vabr (Chromium)
2015/11/26 17:10:37
nit: Seems like you could leave out "credentials"?
|
+ bool retry_password_form_password_update_; |
+ |
// Whether the user can choose to generate a password for this form. |
bool generation_available_; |