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 // Enum for tracking user interactions with the account management menu | |
123 // on Android. | |
124 // This should match its counterpart in AccountManagementScreenHelper.java. | |
125 enum ProfileAndroidAccountManagementMenu { | |
126 // User arrived to the Account management screen. | |
127 PROFILE_ANDROID_ACCOUNT_MANAGEMENT_MENU_VIEW = 0, | |
128 // User arrived to the Account management screen, and clicked Add account. | |
129 PROFILE_ANDROID_ACCOUNT_MANAGEMENT_MENU_ADD_ACCOUNT, | |
130 // User arrived to the Account management screen, and clicked Go incognito. | |
131 PROFILE_ANDROID_ACCOUNT_MANAGEMENT_MENU_GO_INCOGNITO, | |
132 // User arrived to the Account management screen, and clicked on primary. | |
133 PROFILE_ANDROID_ACCOUNT_MANAGEMENT_MENU_CLICK_PRIMARY_ACCOUNT, | |
134 // User arrived to the Account management screen, and clicked on secondary. | |
135 PROFILE_ANDROID_ACCOUNT_MANAGEMENT_MENU_CLICK_SECONDARY_ACCOUNT, | |
136 // User arrived to the Account management screen, toggled Chrome signout. | |
137 PROFILE_ANDROID_ACCOUNT_MANAGEMENT_MENU_TOGGLE_SIGNOUT, | |
138 // User toggled Chrome signout, and clicks Signout. | |
noms (inactive)
2014/06/03 00:52:10
super tiny nit: the other comments use "clicked",
aruslan
2014/06/03 01:05:25
Done, thanks :)
| |
139 PROFILE_ANDROID_ACCOUNT_MANAGEMENT_MENU_SIGNOUT_SIGNOUT, | |
140 // User toggled Chrome signout, and clicks Cancel. | |
141 PROFILE_ANDROID_ACCOUNT_MANAGEMENT_MENU_SIGNOUT_CANCEL, | |
142 NUM_PROFILE_ANDROID_ACCOUNT_MANAGEMENT_MENU_METRICS, | |
143 }; | |
144 #endif // defined(OS_ANDROID) | |
145 | |
121 static void UpdateReportedProfilesStatistics(ProfileManager* manager); | 146 static void UpdateReportedProfilesStatistics(ProfileManager* manager); |
122 | 147 |
123 static void LogNumberOfProfiles(ProfileManager* manager); | 148 static void LogNumberOfProfiles(ProfileManager* manager); |
124 static void LogProfileAddNewUser(ProfileAdd metric); | 149 static void LogProfileAddNewUser(ProfileAdd metric); |
125 static void LogProfileAvatarSelection(size_t icon_index); | 150 static void LogProfileAvatarSelection(size_t icon_index); |
126 static void LogProfileDeleteUser(ProfileNetUserCounts metric); | 151 static void LogProfileDeleteUser(ProfileNetUserCounts metric); |
127 static void LogProfileOpenMethod(ProfileOpen metric); | 152 static void LogProfileOpenMethod(ProfileOpen metric); |
128 static void LogProfileSwitchGaia(ProfileGaia metric); | 153 static void LogProfileSwitchGaia(ProfileGaia metric); |
129 static void LogProfileSwitchUser(ProfileOpen metric); | 154 static void LogProfileSwitchUser(ProfileOpen metric); |
130 static void LogProfileSyncInfo(ProfileSync metric); | 155 static void LogProfileSyncInfo(ProfileSync metric); |
131 static void LogProfileAuthResult(ProfileAuth metric); | 156 static void LogProfileAuthResult(ProfileAuth metric); |
132 static void LogProfileUpgradeEnrollment(ProfileUpgradeEnrollment metric); | 157 static void LogProfileUpgradeEnrollment(ProfileUpgradeEnrollment metric); |
133 static void LogProfileDesktopMenu(ProfileDesktopMenu metric, | 158 static void LogProfileDesktopMenu(ProfileDesktopMenu metric, |
134 signin::GAIAServiceType gaia_service); | 159 signin::GAIAServiceType gaia_service); |
135 | 160 |
161 #if defined(OS_ANDROID) | |
162 static void LogProfileAndroidAccountManagementMenu( | |
163 ProfileAndroidAccountManagementMenu metric, | |
164 signin::GAIAServiceType gaia_service); | |
165 #endif // defined(OS_ANDROID) | |
166 | |
136 // These functions should only be called on the UI thread because they hook | 167 // These functions should only be called on the UI thread because they hook |
137 // into g_browser_process through a helper function. | 168 // into g_browser_process through a helper function. |
138 static void LogProfileLaunch(Profile* profile); | 169 static void LogProfileLaunch(Profile* profile); |
139 static void LogProfileSyncSignIn(const base::FilePath& profile_path); | 170 static void LogProfileSyncSignIn(const base::FilePath& profile_path); |
140 static void LogProfileUpdate(const base::FilePath& profile_path); | 171 static void LogProfileUpdate(const base::FilePath& profile_path); |
141 }; | 172 }; |
142 | 173 |
143 | 174 |
144 #endif // CHROME_BROWSER_PROFILES_PROFILE_METRICS_H_ | 175 #endif // CHROME_BROWSER_PROFILES_PROFILE_METRICS_H_ |
OLD | NEW |