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

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: 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
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 0dfa97a06ddb9c2ff6c83e2fa2b18d268269bfb0..35f69b1f68bfbac0d10816ea2afbdf457a03d292 100644
--- a/components/signin/core/browser/signin_metrics.h
+++ b/components/signin/core/browser/signin_metrics.h
@@ -7,6 +7,31 @@
namespace signin_metrics {
+// Track all the ways a profile can become signed out as a histogram.
+enum ProfileSignout {
+ // The preference or policy controlling if signin is valid has changed.
+ SIGNOUT_PREF_CHANGED,
+ // 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.
+ USER_CLICKED_SIGNOUT,
+ // 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,
+ // User clicked to signout on android.
+ ANDROID_SIGNOUT,
+ // 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
@@ -28,6 +53,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_

Powered by Google App Engine
This is Rietveld 408576698