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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_METRICS_H_ 5 #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_METRICS_H_
6 #define COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_METRICS_H_ 6 #define COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_METRICS_H_
7 7
8 namespace signin_metrics { 8 namespace signin_metrics {
9 9
10 // Track all the ways a profile can become signed out as a histogram.
11 enum ProfileSignout {
12 // The preference or policy controlling if signin is valid has changed.
13 SIGNOUT_PREF_CHANGED,
14 // The valid pattern for signing in to the Google service changed.
15 GOOGLE_SERVICE_NAME_PATTERN_CHANGED,
16 // The preference or policy controlling if signin is valid changed during
17 // the signin process.
18 SIGNIN_PREF_CHANGED_DURING_SIGNIN,
19 // User clicked to signout.
20 USER_CLICKED_SIGNOUT,
21 // The signin process was aborted, but signin had succeeded, so signout. This
22 // may be due to a server response, policy definition or user action.
23 ABORT_SIGNIN,
24 // User clicked to signout on android.
25 ANDROID_SIGNOUT,
26 // The sync server caused the profile to be signed out.
27 SERVER_FORCED_DISABLE,
28 // The credentials are being transfered to a new profile, so the old one is
29 // signed out.
30 TRANSFER_CREDENTIALS,
31 // Keep this as the last enum.
32 NUM_PROFILE_SIGNOUT_METRICS,
33 };
34
10 // Log to UMA histograms and UserCounts stats about a single execution of the 35 // Log to UMA histograms and UserCounts stats about a single execution of the
11 // AccountReconciler. 36 // AccountReconciler.
12 // |total_number_accounts| - How many accounts are in the browser for this 37 // |total_number_accounts| - How many accounts are in the browser for this
13 // profile. 38 // profile.
14 // |count_added_to_cookie_jar| - How many accounts were in the browser but not 39 // |count_added_to_cookie_jar| - How many accounts were in the browser but not
15 // the cookie jar. 40 // the cookie jar.
16 // |count_added_to_token| - How may accounts were in the cookie jar but not in 41 // |count_added_to_token| - How may accounts were in the cookie jar but not in
17 // the browser. 42 // the browser.
18 // |primary_accounts_same| - False if the primary account for the cookie jar 43 // |primary_accounts_same| - False if the primary account for the cookie jar
19 // and the token service were different; else true. 44 // and the token service were different; else true.
20 // |is_first_reconcile| - True if these stats are from the first execution of 45 // |is_first_reconcile| - True if these stats are from the first execution of
21 // the AccountReconcilor. 46 // the AccountReconcilor.
22 void LogSigninAccountReconciliation(int total_number_accounts, 47 void LogSigninAccountReconciliation(int total_number_accounts,
23 int count_added_to_cookie_jar, 48 int count_added_to_cookie_jar,
24 int count_added_to_token, 49 int count_added_to_token,
25 bool primary_accounts_same, 50 bool primary_accounts_same,
26 bool is_first_reconcile); 51 bool is_first_reconcile);
27 52
28 // Track a successful signin. 53 // Track a successful signin.
29 void LogSigninAddAccount(); 54 void LogSigninAddAccount();
30 55
56 // Track a profile signout.
57 void LogSignout(ProfileSignout metric);
58
31 } // namespace signin_metrics 59 } // namespace signin_metrics
32 60
33 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_METRICS_H_ 61 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_METRICS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698