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

Unified Diff: components/autofill/core/browser/form_structure.cc

Issue 2776223002: Adds UKM for autofill attributes in form_structure. (Closed)
Patch Set: Uses vector of pairs instead of map for metrics. Created 3 years, 9 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/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,
+ AutofillMetrics::FILLABLE_FORM_PARSED});
+ } else {
+ AutofillMetrics::LogDeveloperEngagementUkm(
+ ukm_service, source_url(), {AutofillMetrics::FILLABLE_FORM_PARSED});
}
}

Powered by Google App Engine
This is Rietveld 408576698