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 user is eligible for the promo. |
| 133 ELIGIBLE, |
| 134 // The profile has previously opted out of the promo. |
| 135 OPTED_OUT, |
| 136 // The profile is already signed in. |
| 137 SIGNED_IN, |
| 138 // The profile does not have a single, peristent GAIA cookie. |
| 139 NOT_SINGLE_GAIA_ACCOUNT, |
| 140 // Yet to determine how many devices the user has. |
| 141 UNKNOWN_COUNT_DEVICES, |
| 142 // An error was returned trying to determine the account's devices. |
| 143 ERROR_FETCHING_DEVICE_ACTIVITY, |
| 144 // The call to get device activity was throttled, and never executed. |
| 145 THROTTLED_FETCHING_DEVICE_ACTIVITY, |
| 146 // The user has no devices. |
| 147 ZERO_DEVICES, |
| 148 // The user has no device that was recently active. |
| 149 NO_ACTIVE_DEVICES, |
| 150 // Always last enumerated type. |
| 151 NUM_CROSS_DEVICE_PROMO_ELIGIBILITY_METRICS |
| 152 }; |
| 153 |
| 154 // Enum reasons the CrossDevicePromo couldn't initialize, or that it succeeded. |
| 155 enum CrossDevicePromoInitialized { |
| 156 // The promo was initialized successfully. |
| 157 INITIALIZED, |
| 158 // The profile is opted out, so the promo didn't initialize. |
| 159 UNINITIALIZED_OPTED_OUT, |
| 160 // Unable to read the variations configuration. |
| 161 NO_VARIATIONS_CONFIG, |
| 162 // Always the last enumerated type. |
| 163 NUM_CROSS_DEVICE_PROMO_INITIALIZED_METRICS |
| 164 }; |
| 165 |
129 // Log to UMA histograms and UserCounts stats about a single execution of the | 166 // Log to UMA histograms and UserCounts stats about a single execution of the |
130 // AccountReconciler. | 167 // AccountReconciler. |
131 // |total_number_accounts| - How many accounts are in the browser for this | 168 // |total_number_accounts| - How many accounts are in the browser for this |
132 // profile. | 169 // profile. |
133 // |count_added_to_cookie_jar| - How many accounts were in the browser but not | 170 // |count_added_to_cookie_jar| - How many accounts were in the browser but not |
134 // in the cookie jar. | 171 // in the cookie jar. |
135 // |count_removed_from_cookie_jar| - How many accounts were in the cookie jar | 172 // |count_removed_from_cookie_jar| - How many accounts were in the cookie jar |
136 // but not in the browser. | 173 // but not in the browser. |
137 // |primary_accounts_same| - False if the primary account for the cookie jar | 174 // |primary_accounts_same| - False if the primary account for the cookie jar |
138 // and the token service were different; else true. | 175 // 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. | 201 // |time_to_check_connections| is the time it took to complete. |
165 void LogExternalCcResultFetches( | 202 void LogExternalCcResultFetches( |
166 bool fetches_completed, | 203 bool fetches_completed, |
167 const base::TimeDelta& time_to_check_connections); | 204 const base::TimeDelta& time_to_check_connections); |
168 | 205 |
169 // Track when the current authentication error changed. | 206 // Track when the current authentication error changed. |
170 void LogAuthError(GoogleServiceAuthError::State auth_error); | 207 void LogAuthError(GoogleServiceAuthError::State auth_error); |
171 | 208 |
172 void LogSigninConfirmHistogramValue(int action); | 209 void LogSigninConfirmHistogramValue(int action); |
173 | 210 |
| 211 void LogXDevicePromoEligible(CrossDevicePromoEligibility metric); |
| 212 |
| 213 void LogXDevicePromoInitialized(CrossDevicePromoInitialized metric); |
| 214 |
| 215 void LogBrowsingSessionDuration(const base::Time& previous_activity_time); |
| 216 |
174 } // namespace signin_metrics | 217 } // namespace signin_metrics |
175 | 218 |
176 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_METRICS_H_ | 219 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_METRICS_H_ |
OLD | NEW |