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

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

Issue 2747733004: [Password Manager] Send username correction votes (Closed)
Patch Set: Minor changes Created 3 years, 9 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 747162302360371c44a948482130b710068ce08a..648b7bb98c29638055172e2acb3a7b20808e8e93 100644
--- a/components/autofill/core/common/password_form.h
+++ b/components/autofill/core/common/password_form.h
@@ -17,6 +17,12 @@
namespace autofill {
+// Pair of possible username value and field name that contained this value.
+typedef std::pair<base::string16, base::string16> PossibleUsernamePair;
vabr (Chromium) 2017/03/16 21:00:42 Here and below please use: using new_alias = old_t
kolos1 2017/03/17 14:09:34 Done.
+
+// Vector of possible username values and corresponding field names.
+typedef std::vector<PossibleUsernamePair> PossibleUsernamesVector;
+
// The PasswordForm struct encapsulates information about a login form,
// which can be an HTML form or a dialog with username/password text fields.
//
@@ -141,7 +147,7 @@ struct PasswordForm {
// determining the username are incorrect. Optional.
//
// When parsing an HTML form, this is typically empty.
- std::vector<base::string16> other_possible_usernames;
+ PossibleUsernamesVector other_possible_usernames;
// The name of the input element corresponding to the current password.
// Optional (improves scoring).
@@ -305,6 +311,7 @@ struct LessThanUniqueKey {
std::ostream& operator<<(std::ostream& os, PasswordForm::Layout layout);
std::ostream& operator<<(std::ostream& os, const PasswordForm& form);
std::ostream& operator<<(std::ostream& os, PasswordForm* form);
+base::string16 OtherPossibleUsernamesToStr(const PasswordForm& form);
vabr (Chromium) 2017/03/16 21:00:42 Having both OtherPossibleUsernamesToStr and OtherP
kolos1 2017/03/17 14:09:34 Done.
} // namespace autofill

Powered by Google App Engine
This is Rietveld 408576698