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

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: 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 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 // Enum for the ways in which primary account detection is done. 10 // Enum for the ways in which primary account detection is done.
11 enum DifferentPrimaryAccounts { 11 enum DifferentPrimaryAccounts {
12 // token and cookie had same primary accounts. 12 // token and cookie had same primary accounts.
13 ACCOUNTS_SAME = 0, 13 ACCOUNTS_SAME = 0,
14 // Deprecated. Indicates different primary accounts. 14 // Deprecated. Indicates different primary accounts.
15 UNUSED_ACCOUNTS_DIFFERENT, 15 UNUSED_ACCOUNTS_DIFFERENT,
16 // No GAIA cookie present, so the primaries are considered different. 16 // No GAIA cookie present, so the primaries are considered different.
17 NO_COOKIE_PRESENT, 17 NO_COOKIE_PRESENT,
18 // There was at least one cookie and one token, and the primaries differed. 18 // There was at least one cookie and one token, and the primaries differed.
19 COOKIE_AND_TOKEN_PRIMARIES_DIFFERENT, 19 COOKIE_AND_TOKEN_PRIMARIES_DIFFERENT,
20 NUM_DIFFERENT_PRIMARY_ACCOUNT_METRICS, 20 NUM_DIFFERENT_PRIMARY_ACCOUNT_METRICS,
21 }; 21 };
22 22
23 // Track all the ways a profile can become signed out as a histogram.
24 enum ProfileSignout {
25 // The value used within unit tests
26 SIGNOUT_TEST = 0,
27 // The preference or policy controlling if signin is valid has changed.
28 SIGNOUT_PREF_CHANGED = 0,
29 // The valid pattern for signing in to the Google service changed.
30 GOOGLE_SERVICE_NAME_PATTERN_CHANGED,
31 // The preference or policy controlling if signin is valid changed during
32 // the signin process.
33 SIGNIN_PREF_CHANGED_DURING_SIGNIN,
34 // User clicked to signout from the settings page.
35 USER_CLICKED_SIGNOUT_SETTINGS,
36 // The signin process was aborted, but signin had succeeded, so signout. This
37 // may be due to a server response, policy definition or user action.
38 ABORT_SIGNIN,
39 // The sync server caused the profile to be signed out.
40 SERVER_FORCED_DISABLE,
41 // The credentials are being transfered to a new profile, so the old one is
42 // signed out.
43 TRANSFER_CREDENTIALS,
44
45 // Keep this as the last enum.
46 NUM_PROFILE_SIGNOUT_METRICS,
47 };
48
23 // Log to UMA histograms and UserCounts stats about a single execution of the 49 // Log to UMA histograms and UserCounts stats about a single execution of the
24 // AccountReconciler. 50 // AccountReconciler.
25 // |total_number_accounts| - How many accounts are in the browser for this 51 // |total_number_accounts| - How many accounts are in the browser for this
26 // profile. 52 // profile.
27 // |count_added_to_cookie_jar| - How many accounts were in the browser but not 53 // |count_added_to_cookie_jar| - How many accounts were in the browser but not
28 // the cookie jar. 54 // the cookie jar.
29 // |count_added_to_token| - How may accounts were in the cookie jar but not in 55 // |count_added_to_token| - How may accounts were in the cookie jar but not in
30 // the browser. 56 // the browser.
31 // |primary_accounts_same| - False if the primary account for the cookie jar 57 // |primary_accounts_same| - False if the primary account for the cookie jar
32 // and the token service were different; else true. 58 // and the token service were different; else true.
33 // |is_first_reconcile| - True if these stats are from the first execution of 59 // |is_first_reconcile| - True if these stats are from the first execution of
34 // the AccountReconcilor. 60 // the AccountReconcilor.
35 // |pre_count_gaia_cookies| - How many GAIA cookies were present before 61 // |pre_count_gaia_cookies| - How many GAIA cookies were present before
36 // the AccountReconcilor began modifying the state. 62 // the AccountReconcilor began modifying the state.
37 void LogSigninAccountReconciliation(int total_number_accounts, 63 void LogSigninAccountReconciliation(int total_number_accounts,
38 int count_added_to_cookie_jar, 64 int count_added_to_cookie_jar,
39 int count_added_to_token, 65 int count_added_to_token,
40 bool primary_accounts_same, 66 bool primary_accounts_same,
41 bool is_first_reconcile, 67 bool is_first_reconcile,
42 int pre_count_gaia_cookies); 68 int pre_count_gaia_cookies);
43 69
44 // Track a successful signin. 70 // Track a successful signin.
45 void LogSigninAddAccount(); 71 void LogSigninAddAccount();
46 72
73 // Track a profile signout.
74 void LogSignout(ProfileSignout metric);
75
47 } // namespace signin_metrics 76 } // namespace signin_metrics
48 77
49 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_METRICS_H_ 78 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_METRICS_H_
OLDNEW
« 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