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

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: format 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.
105 // This was previously used in Signin.SigninSource UMA histogram, but no longer
106 // used after having below AccessPoint and Reason related histograms.
103 enum Source { 107 enum Source {
104 SOURCE_START_PAGE = 0, // This must be first. 108 SOURCE_START_PAGE = 0, // This must be first.
105 SOURCE_NTP_LINK, 109 SOURCE_SETTINGS = 3,
106 SOURCE_MENU, 110 SOURCE_OTHERS = 13,
107 SOURCE_SETTINGS, 111 };
108 SOURCE_EXTENSION_INSTALL_BUBBLE, 112
109 SOURCE_APP_LAUNCHER, 113 // Enum values which enumerates all access points where sign in could be
110 SOURCE_APPS_PAGE_LINK, 114 // initiated. Not all of them exist on all platforms. They are used with
111 SOURCE_BOOKMARK_BUBBLE, 115 // "Signin.SigninStartedAccessPoint" and "Signin.SigninCompletedAccessPoint"
112 SOURCE_AVATAR_BUBBLE_SIGN_IN, 116 // histograms.
113 SOURCE_AVATAR_BUBBLE_ADD_ACCOUNT, 117 enum class AccessPoint : int {
114 SOURCE_DEVICES_PAGE, 118 ACCESS_POINT_START_PAGE = 0,
115 SOURCE_REAUTH, 119 ACCESS_POINT_NTP_LINK,
116 SOURCE_UNKNOWN, // This must be last. 120 ACCESS_POINT_MENU,
121 ACCESS_POINT_SETTINGS,
122 ACCESS_POINT_SUPERVISED_USER,
123 ACCESS_POINT_EXTENSION_INSTALL_BUBBLE,
124 ACCESS_POINT_EXTENSIONS,
125 ACCESS_POINT_APPS_PAGE_LINK,
126 ACCESS_POINT_BOOKMARK_BUBBLE,
127 ACCESS_POINT_BOOKMARK_MANAGER,
128 ACCESS_POINT_AVATAR_BUBBLE_SIGN_IN,
129 ACCESS_POINT_USER_MANAGER,
130 ACCESS_POINT_DEVICES_PAGE,
131 ACCESS_POINT_CLOUD_PRINT,
132 ACCESS_POINT_CONTENT_AREA,
133 ACCESS_POINT_SIGNIN_PROMO,
134 ACCESS_POINT_RECENT_TABS,
135 ACCESS_POINT_MAX // This must be last.
136 };
137
138 // Enum values which enumerates all reasons to start sign in process.
139 enum class Reason : int {
140 REASON_SIGNIN_PRIMARY_ACCOUNT = 0,
141 REASON_ADD_SECONDARY_ACCOUNT,
142 REASON_REAUTHENTICATION,
143 REASON_UNLOCK,
144 REASON_MAX // This must be last.
117 }; 145 };
118 146
119 // Enum values used for use with the "Signin.Reauth" histogram. 147 // Enum values used for use with the "Signin.Reauth" histogram.
120 enum AccountReauth { 148 enum AccountReauth {
121 // The user gave the wrong email when doing a reauthentication. 149 // The user gave the wrong email when doing a reauthentication.
122 HISTOGRAM_ACCOUNT_MISSMATCH, 150 HISTOGRAM_ACCOUNT_MISSMATCH,
123 // The user was shown a reauthentication login screen. 151 // The user was shown a reauthentication login screen.
124 HISTOGRAM_REAUTH_SHOWN, 152 HISTOGRAM_REAUTH_SHOWN,
125 153
126 HISTOGRAM_REAUTH_MAX 154 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. 198 // The AccountReconcilor has finished running ans is up-to-date.
171 ACCOUNT_RECONCILOR_OK, 199 ACCOUNT_RECONCILOR_OK,
172 // The AccountReconcilor is running and gathering information. 200 // The AccountReconcilor is running and gathering information.
173 ACCOUNT_RECONCILOR_RUNNING, 201 ACCOUNT_RECONCILOR_RUNNING,
174 // The AccountReconcilor encountered an error and stopped. 202 // The AccountReconcilor encountered an error and stopped.
175 ACCOUNT_RECONCILOR_ERROR, 203 ACCOUNT_RECONCILOR_ERROR,
176 // Always the last enumerated type. 204 // Always the last enumerated type.
177 ACCOUNT_RECONCILOR_HISTOGRAM_COUNT, 205 ACCOUNT_RECONCILOR_HISTOGRAM_COUNT,
178 }; 206 };
179 207
208 // Tracks the access point of sign in.
209 void LogSigninAccessPointStarted(AccessPoint access_point);
210 void LogSigninAccessPointCompleted(AccessPoint access_point);
211
212 // Tracks the reason of sign in.
213 void LogSigninReason(Reason reason);
214
180 // Log to UMA histograms and UserCounts stats about a single execution of the 215 // Log to UMA histograms and UserCounts stats about a single execution of the
181 // AccountReconciler. 216 // AccountReconciler.
182 // |total_number_accounts| - How many accounts are in the browser for this 217 // |total_number_accounts| - How many accounts are in the browser for this
183 // profile. 218 // profile.
184 // |count_added_to_cookie_jar| - How many accounts were in the browser but not 219 // |count_added_to_cookie_jar| - How many accounts were in the browser but not
185 // in the cookie jar. 220 // in the cookie jar.
186 // |count_removed_from_cookie_jar| - How many accounts were in the cookie jar 221 // |count_removed_from_cookie_jar| - How many accounts were in the cookie jar
187 // but not in the browser. 222 // but not in the browser.
188 // |primary_accounts_same| - False if the primary account for the cookie jar 223 // |primary_accounts_same| - False if the primary account for the cookie jar
189 // and the token service were different; else true. 224 // and the token service were different; else true.
(...skipping 10 matching lines...) Expand all
200 235
201 // Logs duration of a single execution of AccountReconciler to UMA histograms. 236 // Logs duration of a single execution of AccountReconciler to UMA histograms.
202 // |duration| - How long execution of AccountReconciler took. 237 // |duration| - How long execution of AccountReconciler took.
203 // |successful| - True if AccountReconciler was successful. 238 // |successful| - True if AccountReconciler was successful.
204 void LogSigninAccountReconciliationDuration(base::TimeDelta duration, 239 void LogSigninAccountReconciliationDuration(base::TimeDelta duration,
205 bool successful); 240 bool successful);
206 241
207 // Track a successful signin. 242 // Track a successful signin.
208 void LogSigninAddAccount(); 243 void LogSigninAddAccount();
209 244
210 // Tracks the original source that showed the signin page.
211 void LogSigninSource(Source source);
212
213 // Track a successful signin of a profile. 245 // Track a successful signin of a profile.
214 void LogSigninProfile(bool is_first_run, base::Time install_date); 246 void LogSigninProfile(bool is_first_run, base::Time install_date);
215 247
216 // Track a profile signout. 248 // Track a profile signout.
217 void LogSignout(ProfileSignout metric); 249 void LogSignout(ProfileSignout metric);
218 250
219 // Tracks whether the external connection results were all fetched before 251 // Tracks whether the external connection results were all fetched before
220 // the gaia cookie manager service tried to use them with merge session. 252 // the gaia cookie manager service tried to use them with merge session.
221 // |time_to_check_connections| is the time it took to complete. 253 // |time_to_check_connections| is the time it took to complete.
222 void LogExternalCcResultFetches( 254 void LogExternalCcResultFetches(
(...skipping 12 matching lines...) Expand all
235 void LogBrowsingSessionDuration(const base::Time& previous_activity_time); 267 void LogBrowsingSessionDuration(const base::Time& previous_activity_time);
236 268
237 // Records the AccountReconcilor |state| when GAIA returns a specific response. 269 // Records the AccountReconcilor |state| when GAIA returns a specific response.
238 // If |state| is different than ACCOUNT_RECONCILOR_OK it means the user will 270 // 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. 271 // be shown a different set of accounts in the content-area and the settings UI.
240 void LogAccountReconcilorStateOnGaiaResponse(AccountReconcilorState state); 272 void LogAccountReconcilorStateOnGaiaResponse(AccountReconcilorState state);
241 273
242 } // namespace signin_metrics 274 } // namespace signin_metrics
243 275
244 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_METRICS_H_ 276 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_METRICS_H_
OLDNEW
« no previous file with comments | « chrome/test/base/test_browser_window.h ('k') | components/signin/core/browser/signin_metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698