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 already signed in. |
| 135 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_DEVICES, |
| 140 // An error was returned trying to determine the account's devices. |
| 141 ERROR_FETCHING_DEVICE_ACTIVITY, |
| 142 // The call to get device activity was throttled, and never executed. |
| 143 THROTTLED_FETCHING_DEVICE_ACTIVITY, |
| 144 // The user has no devices. |
| 145 ZERO_DEVICES, |
| 146 // The user has no device that was recently active. |
| 147 NO_ACTIVE_DEVICES, |
| 148 // The user is eligible for the promo. |
| 149 ELIGIBLE, |
| 150 // Always last enumerated type. |
| 151 NUM_CROSS_DEVICE_PROMO_ELIGIBILITY_METRICS |
| 152 }; |
| 153 |
129 // Log to UMA histograms and UserCounts stats about a single execution of the | 154 // Log to UMA histograms and UserCounts stats about a single execution of the |
130 // AccountReconciler. | 155 // AccountReconciler. |
131 // |total_number_accounts| - How many accounts are in the browser for this | 156 // |total_number_accounts| - How many accounts are in the browser for this |
132 // profile. | 157 // profile. |
133 // |count_added_to_cookie_jar| - How many accounts were in the browser but not | 158 // |count_added_to_cookie_jar| - How many accounts were in the browser but not |
134 // in the cookie jar. | 159 // in the cookie jar. |
135 // |count_removed_from_cookie_jar| - How many accounts were in the cookie jar | 160 // |count_removed_from_cookie_jar| - How many accounts were in the cookie jar |
136 // but not in the browser. | 161 // but not in the browser. |
137 // |primary_accounts_same| - False if the primary account for the cookie jar | 162 // |primary_accounts_same| - False if the primary account for the cookie jar |
138 // and the token service were different; else true. | 163 // 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. | 189 // |time_to_check_connections| is the time it took to complete. |
165 void LogExternalCcResultFetches( | 190 void LogExternalCcResultFetches( |
166 bool fetches_completed, | 191 bool fetches_completed, |
167 const base::TimeDelta& time_to_check_connections); | 192 const base::TimeDelta& time_to_check_connections); |
168 | 193 |
169 // Track when the current authentication error changed. | 194 // Track when the current authentication error changed. |
170 void LogAuthError(GoogleServiceAuthError::State auth_error); | 195 void LogAuthError(GoogleServiceAuthError::State auth_error); |
171 | 196 |
172 void LogSigninConfirmHistogramValue(int action); | 197 void LogSigninConfirmHistogramValue(int action); |
173 | 198 |
| 199 void LogXDevicePromoEligible(CrossDevicePromoEligibility metric); |
| 200 |
| 201 void LogBrowsingSessionDuration(const base::Time& previous_activity); |
| 202 |
174 } // namespace signin_metrics | 203 } // namespace signin_metrics |
175 | 204 |
176 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_METRICS_H_ | 205 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_METRICS_H_ |
OLD | NEW |