Chromium Code Reviews| 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 02e861fe9c2a9a7076100f8dc5cd20968a3c1d6b..00b651082f6985721a2a2d2b5b6f2c2595bc6cc6 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 { |
| @@ -332,7 +333,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| |
| @@ -363,6 +364,13 @@ void FormStructure::DetermineHeuristicTypes() { |
| if (has_author_specified_types_) { |
| AutofillMetrics::LogDeveloperEngagementMetric( |
| AutofillMetrics::FILLABLE_FORM_CONTAINS_TYPE_HINTS); |
| + AutofillMetrics::LogDeveloperEngagementUkm( |
| + ukm_service, source_url(), |
| + {AutofillMetrics::FILLABLE_FORM_CONTAINS_TYPE_HINTS, |
|
sebsg
2017/03/29 13:52:58
by looking at the comments of these constants, it
csashi
2017/03/29 16:15:11
Yes, CONTAINS_TYPE_HINTS are a subset of FORM_PARS
sebsg
2017/03/29 17:55:13
I see, I really prefer logging only once if it's a
sebsg
2017/03/29 18:46:09
Ok I talked with Math. Would you mind renaming the
csashi
2017/03/30 00:52:10
Done.
|
| + AutofillMetrics::FILLABLE_FORM_PARSED}); |
| + } else { |
| + AutofillMetrics::LogDeveloperEngagementUkm( |
| + ukm_service, source_url(), {AutofillMetrics::FILLABLE_FORM_PARSED}); |
| } |
| } |