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 #include "base/time/time.h" | 8 #include "base/time/time.h" |
| 9 | 9 |
| 10 #include "google_apis/gaia/google_service_auth_error.h" | 10 #include "google_apis/gaia/google_service_auth_error.h" |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 119 // Enum values used for use with the "Signin.Reauth" histogram. | 119 // Enum values used for use with the "Signin.Reauth" histogram. |
| 120 enum AccountReauth { | 120 enum AccountReauth { |
| 121 // The user gave the wrong email when doing a reauthentication. | 121 // The user gave the wrong email when doing a reauthentication. |
| 122 HISTOGRAM_ACCOUNT_MISSMATCH, | 122 HISTOGRAM_ACCOUNT_MISSMATCH, |
| 123 // The user was shown a reauthentication login screen. | 123 // The user was shown a reauthentication login screen. |
| 124 HISTOGRAM_REAUTH_SHOWN, | 124 HISTOGRAM_REAUTH_SHOWN, |
| 125 | 125 |
| 126 HISTOGRAM_REAUTH_MAX | 126 HISTOGRAM_REAUTH_MAX |
| 127 }; | 127 }; |
| 128 | 128 |
| 129 // Enum values used for "Signin.XDevicePromo.Eligible" histogram, which tracks | |
| 130 // the reasons for which a profile is or is not eligible for the promo. | |
| 131 enum CrossDevicePromoEligibility { | |
| 132 // The profile has previously opted out of the promo. | |
| 133 OPTED_OUT, | |
| 134 // The profile is not signed in. | |
| 135 NOT_SIGNED_IN, | |
| 136 // The profile does not have a single, peristent GAIA cookie. | |
| 137 NOT_SINGLE_GAIA_ACCOUNT, | |
| 138 // Yet to determine how many devices the user has. | |
| 139 UNKNOWN_COUNT_SYNC_DEVICES, | |
| 140 // An error was returned trying to determine the account's devices. | |
| 141 ERROR_FETCHING_SYNC_DEVICES, | |
| 142 // The user has no Sync devices. | |
| 143 ZERO_SYNC_DEVICES, | |
| 144 // The user has no Sync device that was recently active. | |
| 145 NO_ACTIVE_SYNC_DEVICES, | |
| 146 // The user is eligible for the promo. | |
| 147 ELIGIBLE, | |
|
anthonyvd
2015/05/14 18:24:19
nit: Maybe put this one first, this way if more re
Mike Lerman
2015/05/14 20:25:33
Done.
| |
| 148 // Always last enumerated type. | |
| 149 NUM_CROSS_DEVICE_PROMO_ELIGIBILITY_METRICS | |
| 150 }; | |
| 151 | |
| 129 // Log to UMA histograms and UserCounts stats about a single execution of the | 152 // Log to UMA histograms and UserCounts stats about a single execution of the |
| 130 // AccountReconciler. | 153 // AccountReconciler. |
| 131 // |total_number_accounts| - How many accounts are in the browser for this | 154 // |total_number_accounts| - How many accounts are in the browser for this |
| 132 // profile. | 155 // profile. |
| 133 // |count_added_to_cookie_jar| - How many accounts were in the browser but not | 156 // |count_added_to_cookie_jar| - How many accounts were in the browser but not |
| 134 // in the cookie jar. | 157 // in the cookie jar. |
| 135 // |count_removed_from_cookie_jar| - How many accounts were in the cookie jar | 158 // |count_removed_from_cookie_jar| - How many accounts were in the cookie jar |
| 136 // but not in the browser. | 159 // but not in the browser. |
| 137 // |primary_accounts_same| - False if the primary account for the cookie jar | 160 // |primary_accounts_same| - False if the primary account for the cookie jar |
| 138 // and the token service were different; else true. | 161 // and the token service were different; else true. |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 164 // |time_to_check_connections| is the time it took to complete. | 187 // |time_to_check_connections| is the time it took to complete. |
| 165 void LogExternalCcResultFetches( | 188 void LogExternalCcResultFetches( |
| 166 bool fetches_completed, | 189 bool fetches_completed, |
| 167 const base::TimeDelta& time_to_check_connections); | 190 const base::TimeDelta& time_to_check_connections); |
| 168 | 191 |
| 169 // Track when the current authentication error changed. | 192 // Track when the current authentication error changed. |
| 170 void LogAuthError(GoogleServiceAuthError::State auth_error); | 193 void LogAuthError(GoogleServiceAuthError::State auth_error); |
| 171 | 194 |
| 172 void LogSigninConfirmHistogramValue(int action); | 195 void LogSigninConfirmHistogramValue(int action); |
| 173 | 196 |
| 197 void LogXDevicePromoEligible(CrossDevicePromoEligibility metric); | |
| 198 | |
| 174 } // namespace signin_metrics | 199 } // namespace signin_metrics |
| 175 | 200 |
| 176 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_METRICS_H_ | 201 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_METRICS_H_ |
| OLD | NEW |