OLD | NEW |
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 |
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] = {0}; |
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) {} |
32 }; | 35 }; |
33 | 36 |
34 // Enum for counting the ways users were added. | 37 // Enum for counting the ways users were added. |
35 enum ProfileAdd { | 38 enum ProfileAdd { |
36 ADD_NEW_USER_ICON = 0, // User adds new user from icon menu | 39 ADD_NEW_USER_ICON = 0, // User adds new user from icon menu |
37 ADD_NEW_USER_MENU, // User adds new user from menu bar | 40 ADD_NEW_USER_MENU, // User adds new user from menu bar |
38 ADD_NEW_USER_DIALOG, // User adds new user from create-profile dialog | 41 ADD_NEW_USER_DIALOG, // User adds new user from create-profile dialog |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 | 229 |
227 // These functions should only be called on the UI thread because they hook | 230 // These functions should only be called on the UI thread because they hook |
228 // into g_browser_process through a helper function. | 231 // into g_browser_process through a helper function. |
229 static void LogProfileLaunch(Profile* profile); | 232 static void LogProfileLaunch(Profile* profile); |
230 static void LogProfileSyncSignIn(const base::FilePath& profile_path); | 233 static void LogProfileSyncSignIn(const base::FilePath& profile_path); |
231 static void LogProfileUpdate(const base::FilePath& profile_path); | 234 static void LogProfileUpdate(const base::FilePath& profile_path); |
232 }; | 235 }; |
233 | 236 |
234 | 237 |
235 #endif // CHROME_BROWSER_PROFILES_PROFILE_METRICS_H_ | 238 #endif // CHROME_BROWSER_PROFILES_PROFILE_METRICS_H_ |
OLD | NEW |