| 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 |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 PROFILE_AVATAR_MENU_UPGRADE_NOT_YOU, | 207 PROFILE_AVATAR_MENU_UPGRADE_NOT_YOU, |
| 208 NUM_PROFILE_AVATAR_MENU_UPGRADE_METRICS, | 208 NUM_PROFILE_AVATAR_MENU_UPGRADE_METRICS, |
| 209 }; | 209 }; |
| 210 | 210 |
| 211 static void UpdateReportedProfilesStatistics(ProfileManager* manager); | 211 static void UpdateReportedProfilesStatistics(ProfileManager* manager); |
| 212 // Count and return summary information about the profiles currently in the | 212 // Count and return summary information about the profiles currently in the |
| 213 // |manager|. This information is returned in the output variable |counts|. | 213 // |manager|. This information is returned in the output variable |counts|. |
| 214 static bool CountProfileInformation(ProfileManager* manager, | 214 static bool CountProfileInformation(ProfileManager* manager, |
| 215 ProfileCounts* counts); | 215 ProfileCounts* counts); |
| 216 | 216 |
| 217 #if !defined(OS_ANDROID) && !defined(OS_IOS) |
| 217 static void LogNumberOfProfileSwitches(); | 218 static void LogNumberOfProfileSwitches(); |
| 219 #endif |
| 220 |
| 218 #if defined(OS_WIN) || defined(OS_MACOSX) | 221 #if defined(OS_WIN) || defined(OS_MACOSX) |
| 219 // Update OS level tracking of profile counts. | 222 // Update OS level tracking of profile counts. |
| 220 static void UpdateReportedOSProfileStatistics(size_t active, size_t signedin); | 223 static void UpdateReportedOSProfileStatistics(size_t active, size_t signedin); |
| 221 #endif | 224 #endif |
| 222 | 225 |
| 223 static void LogNumberOfProfiles(ProfileManager* manager); | 226 static void LogNumberOfProfiles(ProfileManager* manager); |
| 224 static void LogProfileAddNewUser(ProfileAdd metric); | 227 static void LogProfileAddNewUser(ProfileAdd metric); |
| 225 static void LogProfileAvatarSelection(size_t icon_index); | 228 static void LogProfileAvatarSelection(size_t icon_index); |
| 226 static void LogProfileDeleteUser(ProfileDelete metric); | 229 static void LogProfileDeleteUser(ProfileDelete metric); |
| 227 static void LogProfileOpenMethod(ProfileOpen metric); | 230 static void LogProfileOpenMethod(ProfileOpen metric); |
| 231 #if !defined(OS_ANDROID) && !defined(OS_IOS) |
| 228 static void LogProfileSwitch(ProfileOpen metric, | 232 static void LogProfileSwitch(ProfileOpen metric, |
| 229 ProfileManager* manager, | 233 ProfileManager* manager, |
| 230 const base::FilePath& profile_path); | 234 const base::FilePath& profile_path); |
| 235 #endif |
| 231 static void LogProfileSwitchGaia(ProfileGaia metric); | 236 static void LogProfileSwitchGaia(ProfileGaia metric); |
| 232 static void LogProfileSyncInfo(ProfileSync metric); | 237 static void LogProfileSyncInfo(ProfileSync metric); |
| 233 static void LogProfileAuthResult(ProfileAuth metric); | 238 static void LogProfileAuthResult(ProfileAuth metric); |
| 234 static void LogProfileDesktopMenu(ProfileDesktopMenu metric, | 239 static void LogProfileDesktopMenu(ProfileDesktopMenu metric, |
| 235 signin::GAIAServiceType gaia_service); | 240 signin::GAIAServiceType gaia_service); |
| 236 static void LogProfileDelete(bool profile_was_signed_in); | 241 static void LogProfileDelete(bool profile_was_signed_in); |
| 237 static void LogProfileNewAvatarMenuNotYou(ProfileNewAvatarMenuNotYou metric); | 242 static void LogProfileNewAvatarMenuNotYou(ProfileNewAvatarMenuNotYou metric); |
| 238 static void LogProfileNewAvatarMenuSignin(ProfileNewAvatarMenuSignin metric); | 243 static void LogProfileNewAvatarMenuSignin(ProfileNewAvatarMenuSignin metric); |
| 239 static void LogProfileNewAvatarMenuUpgrade( | 244 static void LogProfileNewAvatarMenuUpgrade( |
| 240 ProfileNewAvatarMenuUpgrade metric); | 245 ProfileNewAvatarMenuUpgrade metric); |
| 241 static void LogTimeToOpenUserManager(const base::TimeDelta& time_to_open); | 246 static void LogTimeToOpenUserManager(const base::TimeDelta& time_to_open); |
| 242 | 247 |
| 243 #if defined(OS_ANDROID) | 248 #if defined(OS_ANDROID) |
| 244 static void LogProfileAndroidAccountManagementMenu( | 249 static void LogProfileAndroidAccountManagementMenu( |
| 245 ProfileAndroidAccountManagementMenu metric, | 250 ProfileAndroidAccountManagementMenu metric, |
| 246 signin::GAIAServiceType gaia_service); | 251 signin::GAIAServiceType gaia_service); |
| 247 #endif // defined(OS_ANDROID) | 252 #endif // defined(OS_ANDROID) |
| 248 | 253 |
| 249 // These functions should only be called on the UI thread because they hook | 254 // These functions should only be called on the UI thread because they hook |
| 250 // into g_browser_process through a helper function. | 255 // into g_browser_process through a helper function. |
| 251 static void LogProfileLaunch(Profile* profile); | 256 static void LogProfileLaunch(Profile* profile); |
| 252 static void LogProfileSyncSignIn(const base::FilePath& profile_path); | 257 static void LogProfileSyncSignIn(const base::FilePath& profile_path); |
| 253 static void LogProfileUpdate(const base::FilePath& profile_path); | 258 static void LogProfileUpdate(const base::FilePath& profile_path); |
| 254 }; | 259 }; |
| 255 | 260 |
| 256 | 261 |
| 257 #endif // CHROME_BROWSER_PROFILES_PROFILE_METRICS_H_ | 262 #endif // CHROME_BROWSER_PROFILES_PROFILE_METRICS_H_ |
| OLD | NEW |