Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 { | |
|
Evan Stade
2014/06/19 01:55:13
what about deleting a profile that's signed in? do
Roger Tawa OOO till Jul 10th
2014/06/19 14:55:13
It might be possible to track that, but not sure i
Mike Lerman
2014/06/19 17:55:48
I'm creating another CL to track profile deletions
| |
| 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. | |
|
Evan Stade
2014/06/19 01:55:13
clicked which control? might want to specify
Mike Lerman
2014/06/19 17:55:48
Done.
| |
| 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 // The sync server caused the profile to be signed out. | |
| 25 SERVER_FORCED_DISABLE, | |
| 26 // The credentials are being transfered to a new profile, so the old one is | |
| 27 // signed out. | |
| 28 TRANSFER_CREDENTIALS, | |
|
Evan Stade
2014/06/19 01:55:13
nit: insert newline
Mike Lerman
2014/06/19 17:55:48
Done... but why? Just to separate out the last cou
Evan Stade
2014/06/19 21:33:36
yes
| |
| 29 // Keep this as the last enum. | |
| 30 NUM_PROFILE_SIGNOUT_METRICS, | |
| 31 }; | |
| 32 | |
| 10 // Log to UMA histograms and UserCounts stats about a single execution of the | 33 // Log to UMA histograms and UserCounts stats about a single execution of the |
| 11 // AccountReconciler. | 34 // AccountReconciler. |
| 12 // |total_number_accounts| - How many accounts are in the browser for this | 35 // |total_number_accounts| - How many accounts are in the browser for this |
| 13 // profile. | 36 // profile. |
| 14 // |count_added_to_cookie_jar| - How many accounts were in the browser but not | 37 // |count_added_to_cookie_jar| - How many accounts were in the browser but not |
| 15 // the cookie jar. | 38 // the cookie jar. |
| 16 // |count_added_to_token| - How may accounts were in the cookie jar but not in | 39 // |count_added_to_token| - How may accounts were in the cookie jar but not in |
| 17 // the browser. | 40 // the browser. |
| 18 // |primary_accounts_same| - False if the primary account for the cookie jar | 41 // |primary_accounts_same| - False if the primary account for the cookie jar |
| 19 // and the token service were different; else true. | 42 // and the token service were different; else true. |
| 20 // |is_first_reconcile| - True if these stats are from the first execution of | 43 // |is_first_reconcile| - True if these stats are from the first execution of |
| 21 // the AccountReconcilor. | 44 // the AccountReconcilor. |
| 22 void LogSigninAccountReconciliation(int total_number_accounts, | 45 void LogSigninAccountReconciliation(int total_number_accounts, |
| 23 int count_added_to_cookie_jar, | 46 int count_added_to_cookie_jar, |
| 24 int count_added_to_token, | 47 int count_added_to_token, |
| 25 bool primary_accounts_same, | 48 bool primary_accounts_same, |
| 26 bool is_first_reconcile); | 49 bool is_first_reconcile); |
| 27 | 50 |
| 28 // Track a successful signin. | 51 // Track a successful signin. |
| 29 void LogSigninAddAccount(); | 52 void LogSigninAddAccount(); |
| 30 | 53 |
| 54 // Track a profile signout. | |
| 55 void LogSignout(ProfileSignout metric); | |
| 56 | |
| 31 } // namespace signin_metrics | 57 } // namespace signin_metrics |
| 32 | 58 |
| 33 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_METRICS_H_ | 59 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_METRICS_H_ |
| OLD | NEW |