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

Unified Diff: components/autofill/content/common/autofill_types_struct_traits.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/content/common/autofill_types_struct_traits.h
diff --git a/components/autofill/content/common/autofill_types_struct_traits.h b/components/autofill/content/common/autofill_types_struct_traits.h
index cbe687abe4193a86b2a36d810eee4c1383bb1e64..9c32b13b25169f1ba6d1e7a5c194593b76bc3202 100644
--- a/components/autofill/content/common/autofill_types_struct_traits.h
+++ b/components/autofill/content/common/autofill_types_struct_traits.h
@@ -428,8 +428,8 @@ struct StructTraits<autofill::mojom::PasswordFormDataView,
return r.username_value;
}
- static const std::vector<base::string16>& other_possible_usernames(
- const autofill::PasswordForm& r) {
+ static const std::vector<autofill::PossibleUsernamePair>&
+ other_possible_usernames(const autofill::PasswordForm& r) {
return r.other_possible_usernames;
}
@@ -598,6 +598,21 @@ struct StructTraits<autofill::mojom::FormsPredictionsMapDataView,
autofill::FormsPredictionsMap* out);
};
+template <>
+struct StructTraits<autofill::mojom::PossibleUsernamePairDataView,
+ autofill::PossibleUsernamePair> {
+ static base::string16 value(const autofill::PossibleUsernamePair& r) {
+ return r.first;
+ }
+
+ static base::string16 field_name(const autofill::PossibleUsernamePair& r) {
+ return r.second;
+ }
+
+ static bool Read(autofill::mojom::PossibleUsernamePairDataView data,
+ autofill::PossibleUsernamePair* out);
+};
+
} // namespace mojo
#endif // COMPONENTS_AUTOFILL_CONTENT_COMMON_AUTOFILL_TYPES_STRUCT_TRAITS_H_

Powered by Google App Engine
This is Rietveld 408576698