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

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

Issue 12588002: [Autofill] Add user type metrics. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 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/browser/autofill_metrics.h
diff --git a/components/autofill/browser/autofill_metrics.h b/components/autofill/browser/autofill_metrics.h
index 6b6544d99ba17872206cb33468f7c737406c6de0..a810c2162a2cb2a1818f9544cfdeedab64564336 100644
--- a/components/autofill/browser/autofill_metrics.h
+++ b/components/autofill/browser/autofill_metrics.h
@@ -51,6 +51,27 @@ class AutofillMetrics {
DIALOG_CANCELED, // The user canceled out of the dialog.
};
+ // The initial state of user that's interacting with a freshly shown
+ // requestAutocomplete or Autocheckout dialog.
+ enum DialogInitialUserStateMetric {
+ // Could not determine the user's state due to failure to communicate with
+ // the Wallet server.
+ DIALOG_USER_STATE_UNKNOWN = 0,
+ // Not signed in, no verified Autofill profiles.
+ DIALOG_USER_NOT_SIGNED_IN_NO_AUTOFILL,
+ // Not signed in, has verified Autofill profiles.
+ DIALOG_USER_NOT_SIGNED_IN_HAS_AUTOFILL,
+ // Signed in, no Wallet items, no verified Autofill profiles.
+ DIALOG_USER_SIGNED_IN_NO_WALLET_NO_AUTOFILL,
+ // Signed in, no Wallet items, has verified Autofill profiles.
+ DIALOG_USER_SIGNED_IN_NO_WALLET_HAS_AUTOFILL,
+ // Signed in, has Wallet items, no verified Autofill profiles.
+ DIALOG_USER_SIGNED_IN_HAS_WALLET_NO_AUTOFILL,
+ // Signed in, has Wallet items, has verified Autofill profiles.
+ DIALOG_USER_SIGNED_IN_HAS_WALLET_HAS_AUTOFILL,
+ NUM_DIALOG_INITIAL_USER_STATE_METRICS
+ };
+
// For measuring the frequency of security warnings or errors that can come
// up as part of the requestAutocomplete flow.
enum DialogSecurityMetric {
@@ -196,6 +217,13 @@ class AutofillMetrics {
virtual void LogUserHappinessMetric(UserHappinessMetric metric) const;
+ // This should be called as soon as the user's signed-in status and Wallet
+ // item count is known. Records that a user starting out in |user_state| is
+ // interacting with a dialog of |dialog_type|.
+ virtual void LogDialogInitialUserState(
+ autofill::DialogType dialog_type,
+ DialogInitialUserStateMetric user_type) const;
+
// Logs |metric| to the security metrics histogram for |dialog_type|.
virtual void LogDialogSecurityMetric(autofill::DialogType dialog_type,
DialogSecurityMetric metric) const;
« no previous file with comments | « chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc ('k') | components/autofill/browser/autofill_metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698