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

Unified Diff: components/autofill/core/browser/autofill_metrics.h

Issue 884843002: Recording in UMA when a user interacted with an address form or a credit card form. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressing isherman comments Created 5 years, 11 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/autofill_metrics.h
diff --git a/components/autofill/core/browser/autofill_metrics.h b/components/autofill/core/browser/autofill_metrics.h
index 92539ba77a68ecf710118bcbc385cd717ee9711c..bfb8a0e3aac52748bae7cba0c2289fcb334d0d64 100644
--- a/components/autofill/core/browser/autofill_metrics.h
+++ b/components/autofill/core/browser/autofill_metrics.h
@@ -243,6 +243,19 @@ class AutofillMetrics {
NUM_USER_HAPPINESS_METRICS,
};
+ // Form Events for autofill.
+ // These events are triggered separetly for address and credit card forms.
+ enum AutofillFormEvent {
Evan Stade 2015/01/30 19:39:50 s/Event/Metric to match the other enums here (Even
Walter Cacau 2015/01/30 22:05:56 Keeping event for now as there seems to be a few o
+ // User interacted with a field of this kind of form. Logged only once per
+ // page load.
+ // TODO(waltercacau): All histograms here seem to start with 0,
+ // but the histogram code seems to expect a minimum of 1. Strangely,
+ // they seem to succeed all the assertions as long as there is more then
+ // one enum value.
Evan Stade 2015/01/30 19:39:50 Ilya^
+ INTERACTED_ONCE = 1,
+ NUM_AUTOFILL_FORM_EVENTS,
+ };
+
// For measuring the network request time of various Wallet API calls. See
// WalletClient::RequestType.
enum WalletApiCallMetric {
@@ -415,6 +428,20 @@ class AutofillMetrics {
// form.
static void LogAddressSuggestionsCount(size_t num_suggestions);
+ // Utility to autofill form events in the relevant histograms depending on
+ // the presence of server and/or local data.
+ struct FormEventLogger {
Evan Stade 2015/01/30 19:39:50 this should be a class not a struct
Walter Cacau 2015/01/30 22:05:56 Done.
+ public:
+ FormEventLogger(
+ bool is_credit_card,
+ bool is_server_data_available,
+ bool is_local_data_available);
+ void Log(AutofillFormEvent event);
Evan Stade 2015/01/30 19:39:50 missing newline and doc
Walter Cacau 2015/01/30 22:05:56 Done.
+ private:
+ bool is_credit_card_;
+ bool is_server_data_available_;
+ bool is_local_data_available_;
+ };
Evan Stade 2015/01/30 19:39:50 missing newline
Walter Cacau 2015/01/30 22:05:56 Done.
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(AutofillMetrics);
};

Powered by Google App Engine
This is Rietveld 408576698