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

Side by Side Diff: components/signin/core/browser/signin_metrics.h

Issue 1473543002: Implement newly designed sign-in related histograms for desktop platorms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comments Created 5 years 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
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 #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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 HISTOGRAM_CONFIRM_LEARN_MORE, 91 HISTOGRAM_CONFIRM_LEARN_MORE,
92 HISTOGRAM_CONFIRM_LEARN_MORE_OK, 92 HISTOGRAM_CONFIRM_LEARN_MORE_OK,
93 HISTOGRAM_CONFIRM_LEARN_MORE_RETURN, 93 HISTOGRAM_CONFIRM_LEARN_MORE_RETURN,
94 HISTOGRAM_CONFIRM_LEARN_MORE_ADVANCED, 94 HISTOGRAM_CONFIRM_LEARN_MORE_ADVANCED,
95 HISTOGRAM_CONFIRM_LEARN_MORE_CLOSE, 95 HISTOGRAM_CONFIRM_LEARN_MORE_CLOSE,
96 HISTOGRAM_CONFIRM_LEARN_MORE_ESCAPE, 96 HISTOGRAM_CONFIRM_LEARN_MORE_ESCAPE,
97 HISTOGRAM_CONFIRM_LEARN_MORE_UNDO, 97 HISTOGRAM_CONFIRM_LEARN_MORE_UNDO,
98 HISTOGRAM_CONFIRM_MAX 98 HISTOGRAM_CONFIRM_MAX
99 }; 99 };
100 100
101 // Enum valus used with the "Signin.SigninSource" histogram, which tracks the 101 // TODO(gogerald): right now, gaia server needs to distinguish the source from
102 // source that launched a Gaia signin page. 102 // signin_metrics::SOURCE_START_PAGE, signin_metrics::SOURCE_SETTINGS and the
103 // others to show advanced sync setting, remove them after switching to Minute
104 // Maid sign in flow.
103 enum Source { 105 enum Source {
104 SOURCE_START_PAGE = 0, // This must be first. 106 SOURCE_START_PAGE = 0, // This must be first.
105 SOURCE_NTP_LINK, 107 SOURCE_SETTINGS = 3,
106 SOURCE_MENU, 108 SOURCE_OTHERS,
107 SOURCE_SETTINGS, 109 };
108 SOURCE_EXTENSION_INSTALL_BUBBLE, 110
109 SOURCE_APP_LAUNCHER, 111 // Enum values which enumerates all access points where sign in could be
110 SOURCE_APPS_PAGE_LINK, 112 // initiated. Not all of them exist on all platforms. They are used with
111 SOURCE_BOOKMARK_BUBBLE, 113 // "Signin.SigninStartedAccessPoint" and "Signin.SigninCompletedAccessPoint"
112 SOURCE_AVATAR_BUBBLE_SIGN_IN, 114 // histograms.
113 SOURCE_AVATAR_BUBBLE_ADD_ACCOUNT, 115 enum AccessPoint {
sky 2015/12/03 22:45:28 As you're changing all this around it would be nic
gogerald1 2015/12/04 20:49:09 Done.
114 SOURCE_DEVICES_PAGE, 116 ACCESS_POINT_START_PAGE = 0,
115 SOURCE_REAUTH, 117 ACCESS_POINT_NTP_LINK,
116 SOURCE_UNKNOWN, // This must be last. 118 ACCESS_POINT_MENU,
119 ACCESS_POINT_SETTINGS,
120 ACCESS_POINT_SUPERVISED_USER,
121 ACCESS_POINT_EXTENSION_INSTALL_BUBBLE,
122 ACCESS_POINT_EXTENSIONS,
123 ACCESS_POINT_APPS_PAGE_LINK,
124 ACCESS_POINT_BOOKMARK_BUBBLE,
125 ACCESS_POINT_BOOKMARK_MANAGER,
126 ACCESS_POINT_AVATAR_BUBBLE_SIGN_IN,
127 ACCESS_POINT_USER_MANAGER,
128 ACCESS_POINT_DEVICES_PAGE,
129 ACCESS_POINT_CLOUD_PRINT,
130 ACCESS_POINT_CONTENT_AREA,
131 ACCESS_POINT_SIGNIN_PROMO,
132 ACCESS_POINT_RECENT_TABS,
133 ACCESS_POINT_MAX // This must be last.
134 };
135
136 // Enum values which enumerates all reasons to start sign in process.
137 enum Reason {
138 REASON_SIGNIN_PRIMARY_ACCOUNT = 0,
139 REASON_ADD_SECONDARY_ACCOUNT,
140 REASON_REAUTHENTICATION,
141 REASON_UNLOCK,
142 REASON_MAX // This must be last.
117 }; 143 };
118 144
119 // Enum values used for use with the "Signin.Reauth" histogram. 145 // Enum values used for use with the "Signin.Reauth" histogram.
120 enum AccountReauth { 146 enum AccountReauth {
121 // The user gave the wrong email when doing a reauthentication. 147 // The user gave the wrong email when doing a reauthentication.
122 HISTOGRAM_ACCOUNT_MISSMATCH, 148 HISTOGRAM_ACCOUNT_MISSMATCH,
123 // The user was shown a reauthentication login screen. 149 // The user was shown a reauthentication login screen.
124 HISTOGRAM_REAUTH_SHOWN, 150 HISTOGRAM_REAUTH_SHOWN,
125 151
126 HISTOGRAM_REAUTH_MAX 152 HISTOGRAM_REAUTH_MAX
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 // The AccountReconcilor has finished running ans is up-to-date. 196 // The AccountReconcilor has finished running ans is up-to-date.
171 ACCOUNT_RECONCILOR_OK, 197 ACCOUNT_RECONCILOR_OK,
172 // The AccountReconcilor is running and gathering information. 198 // The AccountReconcilor is running and gathering information.
173 ACCOUNT_RECONCILOR_RUNNING, 199 ACCOUNT_RECONCILOR_RUNNING,
174 // The AccountReconcilor encountered an error and stopped. 200 // The AccountReconcilor encountered an error and stopped.
175 ACCOUNT_RECONCILOR_ERROR, 201 ACCOUNT_RECONCILOR_ERROR,
176 // Always the last enumerated type. 202 // Always the last enumerated type.
177 ACCOUNT_RECONCILOR_HISTOGRAM_COUNT, 203 ACCOUNT_RECONCILOR_HISTOGRAM_COUNT,
178 }; 204 };
179 205
206 // Tracks the access point of sign in.
207 void LogSigninAccessPointStarted(AccessPoint access_point);
208 void LogSigninAccessPointCompleted(AccessPoint access_point);
209
210 // Tracks the reason of sign in.
211 void LogSigninReason(Reason reason);
212
180 // Log to UMA histograms and UserCounts stats about a single execution of the 213 // Log to UMA histograms and UserCounts stats about a single execution of the
181 // AccountReconciler. 214 // AccountReconciler.
182 // |total_number_accounts| - How many accounts are in the browser for this 215 // |total_number_accounts| - How many accounts are in the browser for this
183 // profile. 216 // profile.
184 // |count_added_to_cookie_jar| - How many accounts were in the browser but not 217 // |count_added_to_cookie_jar| - How many accounts were in the browser but not
185 // in the cookie jar. 218 // in the cookie jar.
186 // |count_removed_from_cookie_jar| - How many accounts were in the cookie jar 219 // |count_removed_from_cookie_jar| - How many accounts were in the cookie jar
187 // but not in the browser. 220 // but not in the browser.
188 // |primary_accounts_same| - False if the primary account for the cookie jar 221 // |primary_accounts_same| - False if the primary account for the cookie jar
189 // and the token service were different; else true. 222 // and the token service were different; else true.
(...skipping 10 matching lines...) Expand all
200 233
201 // Logs duration of a single execution of AccountReconciler to UMA histograms. 234 // Logs duration of a single execution of AccountReconciler to UMA histograms.
202 // |duration| - How long execution of AccountReconciler took. 235 // |duration| - How long execution of AccountReconciler took.
203 // |successful| - True if AccountReconciler was successful. 236 // |successful| - True if AccountReconciler was successful.
204 void LogSigninAccountReconciliationDuration(base::TimeDelta duration, 237 void LogSigninAccountReconciliationDuration(base::TimeDelta duration,
205 bool successful); 238 bool successful);
206 239
207 // Track a successful signin. 240 // Track a successful signin.
208 void LogSigninAddAccount(); 241 void LogSigninAddAccount();
209 242
210 // Tracks the original source that showed the signin page.
211 void LogSigninSource(Source source);
212
213 // Track a successful signin of a profile. 243 // Track a successful signin of a profile.
214 void LogSigninProfile(bool is_first_run, base::Time install_date); 244 void LogSigninProfile(bool is_first_run, base::Time install_date);
215 245
216 // Track a profile signout. 246 // Track a profile signout.
217 void LogSignout(ProfileSignout metric); 247 void LogSignout(ProfileSignout metric);
218 248
219 // Tracks whether the external connection results were all fetched before 249 // Tracks whether the external connection results were all fetched before
220 // the gaia cookie manager service tried to use them with merge session. 250 // the gaia cookie manager service tried to use them with merge session.
221 // |time_to_check_connections| is the time it took to complete. 251 // |time_to_check_connections| is the time it took to complete.
222 void LogExternalCcResultFetches( 252 void LogExternalCcResultFetches(
(...skipping 12 matching lines...) Expand all
235 void LogBrowsingSessionDuration(const base::Time& previous_activity_time); 265 void LogBrowsingSessionDuration(const base::Time& previous_activity_time);
236 266
237 // Records the AccountReconcilor |state| when GAIA returns a specific response. 267 // Records the AccountReconcilor |state| when GAIA returns a specific response.
238 // If |state| is different than ACCOUNT_RECONCILOR_OK it means the user will 268 // If |state| is different than ACCOUNT_RECONCILOR_OK it means the user will
239 // be shown a different set of accounts in the content-area and the settings UI. 269 // be shown a different set of accounts in the content-area and the settings UI.
240 void LogAccountReconcilorStateOnGaiaResponse(AccountReconcilorState state); 270 void LogAccountReconcilorStateOnGaiaResponse(AccountReconcilorState state);
241 271
242 } // namespace signin_metrics 272 } // namespace signin_metrics
243 273
244 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_METRICS_H_ 274 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_METRICS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698