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

Unified Diff: components/signin/core/browser/signin_metrics.h

Issue 338993007: Track when and how a profile is signed out via UMA. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: SignOut() param in Android tests Created 6 years, 6 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
« no previous file with comments | « components/signin/core/browser/signin_manager.cc ('k') | components/signin/core/browser/signin_metrics.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/signin/core/browser/signin_metrics.h
diff --git a/components/signin/core/browser/signin_metrics.h b/components/signin/core/browser/signin_metrics.h
index 9eb78ad4a2f8bf22b36d64c61d1eaaa25db056be..cee56a26d8b10ce22ab53e48e829a200723d75fd 100644
--- a/components/signin/core/browser/signin_metrics.h
+++ b/components/signin/core/browser/signin_metrics.h
@@ -20,6 +20,32 @@ enum DifferentPrimaryAccounts {
NUM_DIFFERENT_PRIMARY_ACCOUNT_METRICS,
};
+// Track all the ways a profile can become signed out as a histogram.
+enum ProfileSignout {
+ // The value used within unit tests
+ SIGNOUT_TEST = 0,
+ // The preference or policy controlling if signin is valid has changed.
+ SIGNOUT_PREF_CHANGED = 0,
+ // The valid pattern for signing in to the Google service changed.
+ GOOGLE_SERVICE_NAME_PATTERN_CHANGED,
+ // The preference or policy controlling if signin is valid changed during
+ // the signin process.
+ SIGNIN_PREF_CHANGED_DURING_SIGNIN,
+ // User clicked to signout from the settings page.
+ USER_CLICKED_SIGNOUT_SETTINGS,
+ // The signin process was aborted, but signin had succeeded, so signout. This
+ // may be due to a server response, policy definition or user action.
+ ABORT_SIGNIN,
+ // The sync server caused the profile to be signed out.
+ SERVER_FORCED_DISABLE,
+ // The credentials are being transfered to a new profile, so the old one is
+ // signed out.
+ TRANSFER_CREDENTIALS,
+
+ // Keep this as the last enum.
+ NUM_PROFILE_SIGNOUT_METRICS,
+};
+
// Log to UMA histograms and UserCounts stats about a single execution of the
// AccountReconciler.
// |total_number_accounts| - How many accounts are in the browser for this
@@ -44,6 +70,9 @@ void LogSigninAccountReconciliation(int total_number_accounts,
// Track a successful signin.
void LogSigninAddAccount();
+// Track a profile signout.
+void LogSignout(ProfileSignout metric);
+
} // namespace signin_metrics
#endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_METRICS_H_
« no previous file with comments | « components/signin/core/browser/signin_manager.cc ('k') | components/signin/core/browser/signin_metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698