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

Side by Side Diff: chrome/browser/profiles/profile_metrics.h

Issue 813133003: New Profile metric for Auth Errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Android and Windows compiler errors Created 6 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROME_BROWSER_PROFILES_PROFILE_METRICS_H_ 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_METRICS_H_
6 #define CHROME_BROWSER_PROFILES_PROFILE_METRICS_H_ 6 #define CHROME_BROWSER_PROFILES_PROFILE_METRICS_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9
noms (inactive) 2014/12/19 19:33:01 nit: drop the empty line
Mike Lerman 2014/12/19 19:53:18 Done.
9 #include <string> 10 #include <string>
10 11
11 #include "base/basictypes.h" 12 #include "base/basictypes.h"
12 #include "chrome/browser/signin/signin_header_helper.h" 13 #include "chrome/browser/signin/signin_header_helper.h"
14 #include "google_apis/gaia/google_service_auth_error.h"
13 15
14 class Profile; 16 class Profile;
15 class ProfileManager; 17 class ProfileManager;
16 18
17 namespace base { 19 namespace base {
18 class FilePath; 20 class FilePath;
19 } 21 }
20 22
21 class ProfileMetrics { 23 class ProfileMetrics {
22 public: 24 public:
23 struct ProfileCounts { 25 struct ProfileCounts {
24 size_t total; 26 size_t total;
25 size_t signedin; 27 size_t signedin;
26 size_t supervised; 28 size_t supervised;
27 size_t unused; 29 size_t unused;
28 size_t gaia_icon; 30 size_t gaia_icon;
31 size_t auth_errors[GoogleServiceAuthError::State::NUM_STATES];
29 32
30 ProfileCounts() 33 ProfileCounts()
31 : total(0), signedin(0), supervised(0), unused(0), gaia_icon(0) {} 34 : total(0), signedin(0), supervised(0), unused(0), gaia_icon(0),
35 auth_errors() {}
noms (inactive) 2014/12/19 19:33:01 nit: now that they don't fit in one line, please a
Mike Lerman 2014/12/19 19:53:18 Like this?
noms (inactive) 2015/01/08 21:49:04 Yup!
Mike Lerman 2015/01/09 02:15:04 Acknowledged.
32 }; 36 };
33 37
34 // Enum for counting the ways users were added. 38 // Enum for counting the ways users were added.
35 enum ProfileAdd { 39 enum ProfileAdd {
36 ADD_NEW_USER_ICON = 0, // User adds new user from icon menu 40 ADD_NEW_USER_ICON = 0, // User adds new user from icon menu
37 ADD_NEW_USER_MENU, // User adds new user from menu bar 41 ADD_NEW_USER_MENU, // User adds new user from menu bar
38 ADD_NEW_USER_DIALOG, // User adds new user from create-profile dialog 42 ADD_NEW_USER_DIALOG, // User adds new user from create-profile dialog
39 ADD_NEW_USER_MANAGER, // User adds new user from User Manager 43 ADD_NEW_USER_MANAGER, // User adds new user from User Manager
40 ADD_NEW_USER_LAST_DELETED, // Auto-created after deleting last user 44 ADD_NEW_USER_LAST_DELETED, // Auto-created after deleting last user
41 NUM_PROFILE_ADD_METRICS 45 NUM_PROFILE_ADD_METRICS
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 230
227 // These functions should only be called on the UI thread because they hook 231 // These functions should only be called on the UI thread because they hook
228 // into g_browser_process through a helper function. 232 // into g_browser_process through a helper function.
229 static void LogProfileLaunch(Profile* profile); 233 static void LogProfileLaunch(Profile* profile);
230 static void LogProfileSyncSignIn(const base::FilePath& profile_path); 234 static void LogProfileSyncSignIn(const base::FilePath& profile_path);
231 static void LogProfileUpdate(const base::FilePath& profile_path); 235 static void LogProfileUpdate(const base::FilePath& profile_path);
232 }; 236 };
233 237
234 238
235 #endif // CHROME_BROWSER_PROFILES_PROFILE_METRICS_H_ 239 #endif // CHROME_BROWSER_PROFILES_PROFILE_METRICS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698