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

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

Issue 2747733004: [Password Manager] Send username correction votes (Closed)
Patch Set: Changes addressed to reviewer comments 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..8bcf44850a8d6f537694bcedfcddb219b24931a7 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.
+using PossibleUsernamePair = std::pair<base::string16, base::string16>;
+
+// Vector of possible username values and corresponding field names.
+using PossibleUsernamesVector = std::vector<PossibleUsernamePair>;
+
// 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).
@@ -301,6 +307,10 @@ struct LessThanUniqueKey {
const std::unique_ptr<PasswordForm>& right) const;
};
+// Converts a vector of possible usernames to string.
+base::string16 OtherPossibleUsernamesToString(
+ const PossibleUsernamesVector& possible_usernames);
+
// For testing.
std::ostream& operator<<(std::ostream& os, PasswordForm::Layout layout);
std::ostream& operator<<(std::ostream& os, const PasswordForm& form);

Powered by Google App Engine
This is Rietveld 408576698