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

Unified Diff: components/password_manager/core/browser/password_form_manager.h

Issue 1476523004: Implementation of new behaviour of Password Manager on retry password forms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments clean up Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
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_;
« no previous file with comments | « chrome/test/data/password/password_form.html ('k') | components/password_manager/core/browser/password_form_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698