| 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 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "chrome/browser/signin/signin_header_helper.h" | 12 #include "chrome/browser/signin/signin_header_helper.h" |
| 13 | 13 |
| 14 class Profile; | 14 class Profile; |
| 15 class ProfileManager; | 15 class ProfileManager; |
| 16 | 16 |
| 17 namespace base { | 17 namespace base { |
| 18 class FilePath; | 18 class FilePath; |
| 19 } | 19 } |
| 20 | 20 |
| 21 class ProfileMetrics { | 21 class ProfileMetrics { |
| 22 public: | 22 public: |
| 23 struct ProfileCounts { | 23 struct ProfileCounts { |
| 24 size_t total; | 24 size_t total; |
| 25 size_t signedin; | 25 size_t signedin; |
| 26 size_t supervised; | 26 size_t supervised; |
| 27 size_t unused; | 27 size_t unused; |
| 28 size_t gaia_icon; | 28 size_t gaia_icon; |
| 29 size_t auth_errors; |
| 29 | 30 |
| 30 ProfileCounts() | 31 ProfileCounts() |
| 31 : total(0), signedin(0), supervised(0), unused(0), gaia_icon(0) {} | 32 : total(0), |
| 33 signedin(0), |
| 34 supervised(0), |
| 35 unused(0), |
| 36 gaia_icon(0), |
| 37 auth_errors(0) {} |
| 32 }; | 38 }; |
| 33 | 39 |
| 34 // Enum for counting the ways users were added. | 40 // Enum for counting the ways users were added. |
| 35 enum ProfileAdd { | 41 enum ProfileAdd { |
| 36 ADD_NEW_USER_ICON = 0, // User adds new user from icon menu | 42 ADD_NEW_USER_ICON = 0, // User adds new user from icon menu |
| 37 ADD_NEW_USER_MENU, // User adds new user from menu bar | 43 ADD_NEW_USER_MENU, // User adds new user from menu bar |
| 38 ADD_NEW_USER_DIALOG, // User adds new user from create-profile dialog | 44 ADD_NEW_USER_DIALOG, // User adds new user from create-profile dialog |
| 39 ADD_NEW_USER_MANAGER, // User adds new user from User Manager | 45 ADD_NEW_USER_MANAGER, // User adds new user from User Manager |
| 40 ADD_NEW_USER_LAST_DELETED, // Auto-created after deleting last user | 46 ADD_NEW_USER_LAST_DELETED, // Auto-created after deleting last user |
| 41 NUM_PROFILE_ADD_METRICS | 47 NUM_PROFILE_ADD_METRICS |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 | 232 |
| 227 // These functions should only be called on the UI thread because they hook | 233 // These functions should only be called on the UI thread because they hook |
| 228 // into g_browser_process through a helper function. | 234 // into g_browser_process through a helper function. |
| 229 static void LogProfileLaunch(Profile* profile); | 235 static void LogProfileLaunch(Profile* profile); |
| 230 static void LogProfileSyncSignIn(const base::FilePath& profile_path); | 236 static void LogProfileSyncSignIn(const base::FilePath& profile_path); |
| 231 static void LogProfileUpdate(const base::FilePath& profile_path); | 237 static void LogProfileUpdate(const base::FilePath& profile_path); |
| 232 }; | 238 }; |
| 233 | 239 |
| 234 | 240 |
| 235 #endif // CHROME_BROWSER_PROFILES_PROFILE_METRICS_H_ | 241 #endif // CHROME_BROWSER_PROFILES_PROFILE_METRICS_H_ |
| OLD | NEW |