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 e631f1dfd66e84505ebb6d5659c2ea3614b73846..6b67118a3549745d92f94a732d1c33490cb2b879 100644 |
--- a/components/autofill/core/browser/autofill_metrics.cc |
+++ b/components/autofill/core/browser/autofill_metrics.cc |
@@ -856,8 +856,9 @@ void AutofillMetrics::FormEventLogger::OnDidPollSuggestions( |
} |
} |
-void AutofillMetrics::FormEventLogger::OnDidShowSuggestions() { |
- form_interactions_ukm_logger_->LogSuggestionsShown(); |
+void AutofillMetrics::FormEventLogger::OnDidShowSuggestions( |
+ const AutofillField& field) { |
+ form_interactions_ukm_logger_->LogSuggestionsShown(field); |
Log(AutofillMetrics::FORM_EVENT_SUGGESTIONS_SHOWN); |
if (!has_logged_suggestions_shown_) { |
@@ -1063,7 +1064,8 @@ void AutofillMetrics::FormInteractionsUkmLogger::LogInteractedWithForm( |
server_record_type_count); |
} |
-void AutofillMetrics::FormInteractionsUkmLogger::LogSuggestionsShown() { |
+void AutofillMetrics::FormInteractionsUkmLogger::LogSuggestionsShown( |
+ const AutofillField& field) { |
if (!CanLog()) |
return; |
@@ -1075,6 +1077,12 @@ void AutofillMetrics::FormInteractionsUkmLogger::LogSuggestionsShown() { |
internal::kUKMSuggestionsShownEntryName); |
builder->AddMetric(internal::kUKMMillisecondsSinceFormParsedMetricName, |
MillisecondsSinceFormParsed()); |
csashi
2017/05/25 08:40:33
Move this metric to the end to be consistent with
jiahuiguo
2017/05/25 19:02:35
Done.
|
+ builder->AddMetric(internal::kUKMHeuristicTypeMetricName, |
+ static_cast<int>(field.heuristic_type())); |
+ builder->AddMetric(internal::kUKMHtmlFieldTypeMetricName, |
+ static_cast<int>(field.html_type())); |
+ builder->AddMetric(internal::kUKMServerTypeMetricName, |
+ static_cast<int>(field.server_type())); |
} |
void AutofillMetrics::FormInteractionsUkmLogger::LogSelectedMaskedServerCard() { |