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

Unified Diff: components/autofill/common/password_form_fill_data.h

Issue 15660018: [autofill] Add support for PSL domain matching for password autofill. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments from isherman Created 7 years, 6 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/common/password_form_fill_data.h
diff --git a/components/autofill/common/password_form_fill_data.h b/components/autofill/common/password_form_fill_data.h
index 1c6091a80d0f43e19c8ac6a382be129a05606348..54764fedda6d8b951d79270d39ca15d67a3ee1ab 100644
--- a/components/autofill/common/password_form_fill_data.h
+++ b/components/autofill/common/password_form_fill_data.h
@@ -25,28 +25,40 @@ struct UsernamesCollectionKey {
base::string16 password;
};
+struct PasswordAndRealm {
+ base::string16 password;
+ std::string realm;
+};
+
// Structure used for autofilling password forms.
-// basic_data identifies the HTML form on the page and preferred username/
-// password for login, while
-// additional_logins is a list of other matching user/pass pairs for the form.
-// other_possible_usernames is a list of possible usernames in the case where we
-// aren't completely sure that the original saved username is correct.
-// This data is keyed by the saved username/password to ensure uniqueness,
-// though the username is not used.
-// wait_for_username tells us whether we need to wait for the user to enter
-// a valid username before we autofill the password. By default, this is off
-// unless the PasswordManager determined there is an additional risk
-// associated with this form. This can happen, for example, if action URI's
-// of the observed form and our saved representation don't match up.
struct PasswordFormFillData {
- typedef std::map<base::string16, base::string16> LoginCollection;
+ typedef std::map<base::string16, PasswordAndRealm> LoginCollection;
typedef std::map<UsernamesCollectionKey,
std::vector<base::string16> > UsernamesCollection;
+ // Identifies the HTML form on the page and preferred username/password for
+ // login.
FormData basic_data;
+
+ // The signon realm of the preferred user/pass pair.
+ std::string preferred_realm;
+
+ // A list of other matching username->PasswordAndRealm pairs for the form.
LoginCollection additional_logins;
+
+ // A list of possible usernames in the case where we aren't completely sure
+ // that the original saved username is correct. This data is keyed by the
+ // saved username/password to ensure uniqueness, though the username is not
+ // used.
UsernamesCollection other_possible_usernames;
+
+ // Tells us whether we need to wait for the user to enter a valid username
+ // before we autofill the password. By default, this is off unless the
+ // PasswordManager determined there is an additional risk associated with this
+ // form. This can happen, for example, if action URI's of the observed form
+ // and our saved representation don't match up.
bool wait_for_username;
+
PasswordFormFillData();
~PasswordFormFillData();
};

Powered by Google App Engine
This is Rietveld 408576698