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

Unified Diff: components/autofill/content/common/autofill_types_struct_traits.h

Issue 2859243004: Add metrics for PasswordForm submission types (Closed)
Patch Set: addressed reviewer comments Created 3 years, 7 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 7d4c03035427ec97cd496d13f90986d53dd14d98..0c51ed527ab74e10da26b76112817e73b92bd907 100644
--- a/components/autofill/content/common/autofill_types_struct_traits.h
+++ b/components/autofill/content/common/autofill_types_struct_traits.h
@@ -85,6 +85,16 @@ struct EnumTraits<autofill::mojom::PasswordFormFieldPredictionType,
autofill::PasswordFormFieldPredictionType* output);
};
+template <>
+struct EnumTraits<autofill::mojom::PasswordFormSubmissionIndicatorEvent,
+ autofill::PasswordForm::SubmissionIndicatorEvent> {
+ static autofill::mojom::PasswordFormSubmissionIndicatorEvent ToMojom(
+ autofill::PasswordForm::SubmissionIndicatorEvent input);
+ static bool FromMojom(
+ autofill::mojom::PasswordFormSubmissionIndicatorEvent input,
+ autofill::PasswordForm::SubmissionIndicatorEvent* output);
+};
+
template <>
struct StructTraits<autofill::mojom::FormFieldDataDataView,
autofill::FormFieldData> {
@@ -497,6 +507,11 @@ struct StructTraits<autofill::mojom::PasswordFormDataView,
return r.does_look_like_signup_form;
}
+ static autofill::PasswordForm::SubmissionIndicatorEvent submission_event(
+ const autofill::PasswordForm& r) {
+ return r.submission_event;
+ }
+
static bool Read(autofill::mojom::PasswordFormDataView data,
autofill::PasswordForm* out);
};

Powered by Google App Engine
This is Rietveld 408576698