Index: components/autofill/core/browser/autofill_metrics.cc |
diff --git a/components/autofill/core/browser/autofill_metrics.cc b/components/autofill/core/browser/autofill_metrics.cc |
index f39d393a73fc0a47faab845d64e2d99abb724560..ef99af906a0cbad6c3600250055a7bf8193f7f5f 100644 |
--- a/components/autofill/core/browser/autofill_metrics.cc |
+++ b/components/autofill/core/browser/autofill_metrics.cc |
@@ -9,6 +9,7 @@ |
#include "base/logging.h" |
#include "base/metrics/histogram_macros.h" |
#include "base/metrics/sparse_histogram.h" |
+#include "base/metrics/user_metrics.h" |
#include "base/time/time.h" |
#include "components/autofill/core/browser/autofill_type.h" |
#include "components/autofill/core/browser/form_structure.h" |
@@ -650,6 +651,8 @@ void AutofillMetrics::LogAutofillSuggestionAcceptedIndex(int index) { |
// A maximum of 50 is enforced to minimize the number of buckets generated. |
UMA_HISTOGRAM_SPARSE_SLOWLY("Autofill.SuggestionAcceptedIndex", |
std::min(index, 50)); |
+ |
+ base::RecordAction(base::UserMetricsAction("Autofill_SelectedSuggestion")); |
} |
// static |
@@ -731,6 +734,14 @@ void AutofillMetrics::FormEventLogger::OnDidShowSuggestions() { |
has_logged_suggestions_shown_ = true; |
Log(AutofillMetrics::FORM_EVENT_SUGGESTIONS_SHOWN_ONCE); |
} |
+ |
+ if (is_for_credit_card_) { |
+ base::RecordAction( |
+ base::UserMetricsAction("Autofill_ShowedCreditCardSuggestions")); |
+ } else { |
+ base::RecordAction( |
+ base::UserMetricsAction("Autofill_ShowedProfileSuggestions")); |
+ } |
} |
void AutofillMetrics::FormEventLogger::OnDidSelectMaskedServerCardSuggestion() { |
@@ -769,6 +780,9 @@ void AutofillMetrics::FormEventLogger::OnDidFillSuggestion( |
Log(AutofillMetrics::FORM_EVENT_LOCAL_SUGGESTION_FILLED_ONCE); |
} |
} |
+ |
+ base::RecordAction( |
+ base::UserMetricsAction("Autofill_FilledCreditCardSuggestion")); |
} |
void AutofillMetrics::FormEventLogger::OnDidFillSuggestion( |
@@ -787,6 +801,9 @@ void AutofillMetrics::FormEventLogger::OnDidFillSuggestion( |
? AutofillMetrics::FORM_EVENT_SERVER_SUGGESTION_FILLED_ONCE |
: AutofillMetrics::FORM_EVENT_LOCAL_SUGGESTION_FILLED_ONCE); |
} |
+ |
+ base::RecordAction( |
+ base::UserMetricsAction("Autofill_FilledProfileSuggestion")); |
} |
void AutofillMetrics::FormEventLogger::OnWillSubmitForm() { |
@@ -809,6 +826,8 @@ void AutofillMetrics::FormEventLogger::OnWillSubmitForm() { |
} else { |
Log(AutofillMetrics::FORM_EVENT_LOCAL_SUGGESTION_WILL_SUBMIT_ONCE); |
} |
+ |
+ base::RecordAction(base::UserMetricsAction("Autofill_OnWillSubmitForm")); |
} |
void AutofillMetrics::FormEventLogger::OnFormSubmitted() { |
@@ -831,6 +850,18 @@ void AutofillMetrics::FormEventLogger::OnFormSubmitted() { |
} else { |
Log(AutofillMetrics::FORM_EVENT_LOCAL_SUGGESTION_SUBMITTED_ONCE); |
} |
+ |
+ base::RecordAction(base::UserMetricsAction("Autofill_FormSubmitted")); |
+} |
+ |
+void AutofillMetrics::FormEventLogger::OnDidPollSuggestions() { |
+ if (is_for_credit_card_) { |
+ base::RecordAction( |
+ base::UserMetricsAction("Autofill_PolledCreditCardSuggestions")); |
+ } else { |
+ base::RecordAction( |
+ base::UserMetricsAction("Autofill_PolledProfileSuggestions")); |
+ } |
} |
void AutofillMetrics::FormEventLogger::Log(FormEvent event) const { |