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

Unified Diff: components/autofill/core/common/password_form.h

Issue 356223002: PasswordForm: move from current/old password scheme to current/new. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 5 months 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/autofill/core/common/password_form.h
diff --git a/components/autofill/core/common/password_form.h b/components/autofill/core/common/password_form.h
index d732493c9d0208bd45a2eaaf4327805637889888..d21aee9bc703c82a5078055751358ad1d6497e8b 100644
--- a/components/autofill/core/common/password_form.h
+++ b/components/autofill/core/common/password_form.h
@@ -116,12 +116,16 @@ struct PasswordForm {
// When parsing an HTML form, this is typically empty.
std::vector<base::string16> other_possible_usernames;
- // The name of the password input element, Optional (improves scoring).
+ // The name of the input element corresponding to the current password.
+ // Optional (improves scoring).
//
- // When parsing an HTML form, this must always be set.
+ // When parsing an HTML form, this will always be set, unless it is a sign-up
+ // form or a change password form that does not ask for the current password.
+ // In these two cases the |new_password_element| will always be set.
base::string16 password_element;
- // The password. Required.
+ // The current password. Must be non-empty for PasswordForm instances that are
+ // meant to be persisted to the password store.
//
// When parsing an HTML form, this is typically empty.
base::string16 password_value;
@@ -130,12 +134,12 @@ struct PasswordForm {
// True otherwise.
bool password_autocomplete_set;
- // If the form was a change password form, the name of the
- // 'old password' input element. Optional.
- base::string16 old_password_element;
+ // If the form was a sign-up or a change password form, the name of the input
+ // element corresponding to the new password. Optional, and not persisted.
+ base::string16 new_password_element;
- // The old password. Optional.
- base::string16 old_password_value;
+ // The new password. Optional, and not persisted.
+ base::string16 new_password_value;
// Whether or not this login was saved under an HTTPS session with a valid
// SSL cert. We will never match or autofill a PasswordForm where

Powered by Google App Engine
This is Rietveld 408576698