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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 PROFILE_DESKTOP_MENU_REMOVE_ACCT, | 111 PROFILE_DESKTOP_MENU_REMOVE_ACCT, |
112 // User opened the user menu, and started adding an account. | 112 // User opened the user menu, and started adding an account. |
113 PROFILE_DESKTOP_MENU_ADD_ACCT, | 113 PROFILE_DESKTOP_MENU_ADD_ACCT, |
114 // User opened the user menu, and changed the profile name. | 114 // User opened the user menu, and changed the profile name. |
115 PROFILE_DESKTOP_MENU_EDIT_NAME, | 115 PROFILE_DESKTOP_MENU_EDIT_NAME, |
116 // User opened the user menu, and started selecting a new profile image. | 116 // User opened the user menu, and started selecting a new profile image. |
117 PROFILE_DESKTOP_MENU_EDIT_IMAGE, | 117 PROFILE_DESKTOP_MENU_EDIT_IMAGE, |
118 NUM_PROFILE_DESKTOP_MENU_METRICS, | 118 NUM_PROFILE_DESKTOP_MENU_METRICS, |
119 }; | 119 }; |
120 | 120 |
| 121 #if defined(OS_ANDROID) |
| 122 // TODO(aruslan): http://crbug.com/379987 Move to a generator. |
| 123 // Enum for tracking user interactions with the account management menu |
| 124 // on Android. |
| 125 // This should match its counterpart in AccountManagementScreenHelper.java. |
| 126 enum ProfileAndroidAccountManagementMenu { |
| 127 // User arrived at the Account management screen. |
| 128 PROFILE_ANDROID_ACCOUNT_MANAGEMENT_MENU_VIEW = 0, |
| 129 // User arrived at the Account management screen, and clicked Add account. |
| 130 PROFILE_ANDROID_ACCOUNT_MANAGEMENT_MENU_ADD_ACCOUNT, |
| 131 // User arrived at the Account management screen, and clicked Go incognito. |
| 132 PROFILE_ANDROID_ACCOUNT_MANAGEMENT_MENU_GO_INCOGNITO, |
| 133 // User arrived at the Account management screen, and clicked on primary. |
| 134 PROFILE_ANDROID_ACCOUNT_MANAGEMENT_MENU_CLICK_PRIMARY_ACCOUNT, |
| 135 // User arrived at the Account management screen, and clicked on secondary. |
| 136 PROFILE_ANDROID_ACCOUNT_MANAGEMENT_MENU_CLICK_SECONDARY_ACCOUNT, |
| 137 // User arrived at the Account management screen, toggled Chrome signout. |
| 138 PROFILE_ANDROID_ACCOUNT_MANAGEMENT_MENU_TOGGLE_SIGNOUT, |
| 139 // User toggled Chrome signout, and clicked Signout. |
| 140 PROFILE_ANDROID_ACCOUNT_MANAGEMENT_MENU_SIGNOUT_SIGNOUT, |
| 141 // User toggled Chrome signout, and clicked Cancel. |
| 142 PROFILE_ANDROID_ACCOUNT_MANAGEMENT_MENU_SIGNOUT_CANCEL, |
| 143 NUM_PROFILE_ANDROID_ACCOUNT_MANAGEMENT_MENU_METRICS, |
| 144 }; |
| 145 #endif // defined(OS_ANDROID) |
| 146 |
121 static void UpdateReportedProfilesStatistics(ProfileManager* manager); | 147 static void UpdateReportedProfilesStatistics(ProfileManager* manager); |
122 | 148 |
123 static void LogNumberOfProfiles(ProfileManager* manager); | 149 static void LogNumberOfProfiles(ProfileManager* manager); |
124 static void LogProfileAddNewUser(ProfileAdd metric); | 150 static void LogProfileAddNewUser(ProfileAdd metric); |
125 static void LogProfileAvatarSelection(size_t icon_index); | 151 static void LogProfileAvatarSelection(size_t icon_index); |
126 static void LogProfileDeleteUser(ProfileNetUserCounts metric); | 152 static void LogProfileDeleteUser(ProfileNetUserCounts metric); |
127 static void LogProfileOpenMethod(ProfileOpen metric); | 153 static void LogProfileOpenMethod(ProfileOpen metric); |
128 static void LogProfileSwitchGaia(ProfileGaia metric); | 154 static void LogProfileSwitchGaia(ProfileGaia metric); |
129 static void LogProfileSwitchUser(ProfileOpen metric); | 155 static void LogProfileSwitchUser(ProfileOpen metric); |
130 static void LogProfileSyncInfo(ProfileSync metric); | 156 static void LogProfileSyncInfo(ProfileSync metric); |
131 static void LogProfileAuthResult(ProfileAuth metric); | 157 static void LogProfileAuthResult(ProfileAuth metric); |
132 static void LogProfileUpgradeEnrollment(ProfileUpgradeEnrollment metric); | 158 static void LogProfileUpgradeEnrollment(ProfileUpgradeEnrollment metric); |
133 static void LogProfileDesktopMenu(ProfileDesktopMenu metric, | 159 static void LogProfileDesktopMenu(ProfileDesktopMenu metric, |
134 signin::GAIAServiceType gaia_service); | 160 signin::GAIAServiceType gaia_service); |
135 | 161 |
| 162 #if defined(OS_ANDROID) |
| 163 static void LogProfileAndroidAccountManagementMenu( |
| 164 ProfileAndroidAccountManagementMenu metric, |
| 165 signin::GAIAServiceType gaia_service); |
| 166 #endif // defined(OS_ANDROID) |
| 167 |
136 // These functions should only be called on the UI thread because they hook | 168 // These functions should only be called on the UI thread because they hook |
137 // into g_browser_process through a helper function. | 169 // into g_browser_process through a helper function. |
138 static void LogProfileLaunch(Profile* profile); | 170 static void LogProfileLaunch(Profile* profile); |
139 static void LogProfileSyncSignIn(const base::FilePath& profile_path); | 171 static void LogProfileSyncSignIn(const base::FilePath& profile_path); |
140 static void LogProfileUpdate(const base::FilePath& profile_path); | 172 static void LogProfileUpdate(const base::FilePath& profile_path); |
141 }; | 173 }; |
142 | 174 |
143 | 175 |
144 #endif // CHROME_BROWSER_PROFILES_PROFILE_METRICS_H_ | 176 #endif // CHROME_BROWSER_PROFILES_PROFILE_METRICS_H_ |
OLD | NEW |