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..5d8abc78451fdb923362a9bafc8c7708041ed5dc 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,10 @@ class PasswordFormManager : public PasswordStoreConsumer { |
// Whether the saved password was overridden. |
bool password_overridden_; |
+ // Whether this submission is considered to be an entering new password on a |
vabr (Chromium)
2015/11/26 14:35:54
The comment needs a bit more clarity. "Retry form"
dvadym
2015/11/26 15:19:55
I've changed comment to
// A form is considered
|
+ // retry password form. |
+ bool retry_password_form_password_update_; |
vabr (Chromium)
2015/11/26 14:35:54
optional nit: You can also use
bool retry_passwor
dvadym
2015/11/26 15:19:55
I'll leave as is, since all other variable in this
|
+ |
// Whether the user can choose to generate a password for this form. |
bool generation_available_; |