| Index: components/autofill/core/browser/form_structure.cc
|
| diff --git a/components/autofill/core/browser/form_structure.cc b/components/autofill/core/browser/form_structure.cc
|
| index 282a59aa9324e4f94d2de78a8899e081c005b4c7..496257e4824868507bf4008a79c5e39304b83b2f 100644
|
| --- a/components/autofill/core/browser/form_structure.cc
|
| +++ b/components/autofill/core/browser/form_structure.cc
|
| @@ -36,6 +36,7 @@
|
| #include "components/autofill/core/common/signatures_util.h"
|
| #include "components/rappor/public/rappor_utils.h"
|
| #include "components/rappor/rappor_service_impl.h"
|
| +#include "components/ukm/ukm_service.h"
|
|
|
| namespace autofill {
|
| namespace {
|
| @@ -336,7 +337,7 @@ FormStructure::FormStructure(const FormData& form)
|
|
|
| FormStructure::~FormStructure() {}
|
|
|
| -void FormStructure::DetermineHeuristicTypes() {
|
| +void FormStructure::DetermineHeuristicTypes(ukm::UkmService* ukm_service) {
|
| const auto determine_heuristic_types_start_time = base::TimeTicks::Now();
|
|
|
| // First, try to detect field types based on each field's |autocomplete|
|
| @@ -362,12 +363,13 @@ void FormStructure::DetermineHeuristicTypes() {
|
| IdentifySections(has_author_specified_sections_);
|
|
|
| if (IsAutofillable()) {
|
| - AutofillMetrics::LogDeveloperEngagementMetric(
|
| - AutofillMetrics::FILLABLE_FORM_PARSED);
|
| - if (has_author_specified_types_) {
|
| - AutofillMetrics::LogDeveloperEngagementMetric(
|
| - AutofillMetrics::FILLABLE_FORM_CONTAINS_TYPE_HINTS);
|
| - }
|
| + const auto metric =
|
| + has_author_specified_types_
|
| + ? AutofillMetrics::FILLABLE_FORM_PARSED_WITH_TYPE_HINTS
|
| + : AutofillMetrics::FILLABLE_FORM_PARSED_WITHOUT_TYPE_HINTS;
|
| + AutofillMetrics::LogDeveloperEngagementMetric(metric);
|
| + AutofillMetrics::LogDeveloperEngagementUkm(ukm_service, source_url(),
|
| + metric);
|
| }
|
|
|
| if (has_author_specified_upi_vpa_hint_) {
|
|
|