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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
136 // User arrived at the Account management screen, toggled Chrome signout. | 136 // User arrived at the Account management screen, toggled Chrome signout. |
137 PROFILE_ANDROID_ACCOUNT_MANAGEMENT_MENU_TOGGLE_SIGNOUT, | 137 PROFILE_ANDROID_ACCOUNT_MANAGEMENT_MENU_TOGGLE_SIGNOUT, |
138 // User toggled Chrome signout, and clicked Signout. | 138 // User toggled Chrome signout, and clicked Signout. |
139 PROFILE_ANDROID_ACCOUNT_MANAGEMENT_MENU_SIGNOUT_SIGNOUT, | 139 PROFILE_ANDROID_ACCOUNT_MANAGEMENT_MENU_SIGNOUT_SIGNOUT, |
140 // User toggled Chrome signout, and clicked Cancel. | 140 // User toggled Chrome signout, and clicked Cancel. |
141 PROFILE_ANDROID_ACCOUNT_MANAGEMENT_MENU_SIGNOUT_CANCEL, | 141 PROFILE_ANDROID_ACCOUNT_MANAGEMENT_MENU_SIGNOUT_CANCEL, |
142 NUM_PROFILE_ANDROID_ACCOUNT_MANAGEMENT_MENU_METRICS, | 142 NUM_PROFILE_ANDROID_ACCOUNT_MANAGEMENT_MENU_METRICS, |
143 }; | 143 }; |
144 #endif // defined(OS_ANDROID) | 144 #endif // defined(OS_ANDROID) |
145 | 145 |
146 // Enum for tracking user interactions with the signin bubble that appears | |
msw
2014/08/14 20:42:03
nit: remove redundant "signin", as per "upon signi
Mike Lerman
2014/08/14 20:58:30
Done.
| |
147 // in the New Avatar Menu upon signin. This bubble appears after the user | |
148 // signs in using the Inline Signin flow. | |
149 enum ProfileDesktopSignin { | |
msw
2014/08/14 20:42:03
nit: Is noting Desktop important? Maybe just note
Mike Lerman
2014/08/14 20:58:30
Done. I went with ProfileNewAvatarMenuSignin to be
| |
150 // User viewed the signin bubble after successfully using the inline signin. | |
151 PROFILE_DESKTOP_SIGNIN_VIEW = 0, | |
152 // User selected ok to dismiss the signin bubble. | |
153 PROFILE_DESKTOP_SIGNIN_OK, | |
154 // User opened the settings from the signin bubble. | |
155 PROFILE_DESKTOP_SIGNIN_SETTINGS, | |
156 NUM_PROFILE_DESKTOP_SIGNIN_METRICS, | |
157 }; | |
158 | |
159 // Enum for tracking user interactions with the bubble that appears for all | |
160 // users in the new avatar menu after upgrading. | |
161 enum ProfileNewAvatarMenuUpgrade { | |
162 // User views the upgrade bubble. | |
163 PROFILE_AVATAR_MENU_UPGRADE_VIEW, | |
msw
2014/08/14 20:42:03
nit: = 0
Mike Lerman
2014/08/14 20:58:30
Done.
| |
164 // User dismissed the upgrade bubble. | |
165 PROFILE_AVATAR_MENU_UPGRADE_DISMISS, | |
166 // User selects 'What's New' in the upgrade bubble. | |
167 PROFILE_AVATAR_MENU_UPGRADE_WHATS_NEW, | |
168 // User selects 'Not You?' in the upgrade bubble. | |
169 PROFILE_AVATAR_MENU_UPGRADE_NOT_YOU, | |
170 NUM_PROFILE_AVATAR_MENU_UPGRADE_METRICS, | |
171 }; | |
172 | |
173 // Enum for tracking user interactions with the Not You? bubble that users | |
msw
2014/08/14 20:42:03
nit: 'Not You?' like above; here and in the entrie
Mike Lerman
2014/08/14 20:58:30
Done.
| |
174 // can navigate to from the Upgrade bubble after upgrade. | |
175 enum ProfileNewAvatarMenuNotYou { | |
176 // User views the Not You? bubble. | |
177 PROFILE_AVATAR_MENU_NOT_YOU_VIEW, | |
msw
2014/08/14 20:42:03
nit: = 0
Mike Lerman
2014/08/14 20:58:30
Done.
| |
178 // User selects back from within the Not You? bubble. | |
179 PROFILE_AVATAR_MENU_NOT_YOU_BACK, | |
180 // User adds a person from within the Not You? bubble. | |
181 PROFILE_AVATAR_MENU_NOT_YOU_ADD_PERSON, | |
182 // User chooses to disconnect (sign out) from within the Not You? bubble. | |
183 PROFILE_AVATAR_MENU_NOT_YOU_DISCONNECT, | |
184 NUM_PROFILE_AVATAR_MENU_NOT_YOU_METRICS, | |
185 }; | |
186 | |
146 static void UpdateReportedProfilesStatistics(ProfileManager* manager); | 187 static void UpdateReportedProfilesStatistics(ProfileManager* manager); |
147 // Count and return summary information about the profiles currently in the | 188 // Count and return summary information about the profiles currently in the |
148 // |manager|. This information is returned in the output variable |counts|. | 189 // |manager|. This information is returned in the output variable |counts|. |
149 static bool CountProfileInformation(ProfileManager* manager, | 190 static bool CountProfileInformation(ProfileManager* manager, |
150 ProfileCounts* counts); | 191 ProfileCounts* counts); |
151 | 192 |
152 static void LogNumberOfProfiles(ProfileManager* manager); | 193 static void LogNumberOfProfiles(ProfileManager* manager); |
153 static void LogProfileAddNewUser(ProfileAdd metric); | 194 static void LogProfileAddNewUser(ProfileAdd metric); |
154 static void LogProfileAvatarSelection(size_t icon_index); | 195 static void LogProfileAvatarSelection(size_t icon_index); |
155 static void LogProfileDeleteUser(ProfileDelete metric); | 196 static void LogProfileDeleteUser(ProfileDelete metric); |
156 static void LogProfileOpenMethod(ProfileOpen metric); | 197 static void LogProfileOpenMethod(ProfileOpen metric); |
157 static void LogProfileSwitchGaia(ProfileGaia metric); | 198 static void LogProfileSwitchGaia(ProfileGaia metric); |
158 static void LogProfileSwitchUser(ProfileOpen metric); | 199 static void LogProfileSwitchUser(ProfileOpen metric); |
159 static void LogProfileSyncInfo(ProfileSync metric); | 200 static void LogProfileSyncInfo(ProfileSync metric); |
160 static void LogProfileAuthResult(ProfileAuth metric); | 201 static void LogProfileAuthResult(ProfileAuth metric); |
161 static void LogProfileDesktopMenu(ProfileDesktopMenu metric, | 202 static void LogProfileDesktopMenu(ProfileDesktopMenu metric, |
162 signin::GAIAServiceType gaia_service); | 203 signin::GAIAServiceType gaia_service); |
163 static void LogProfileDelete(bool profile_was_signed_in); | 204 static void LogProfileDelete(bool profile_was_signed_in); |
205 static void LogProfileDesktopSignin(ProfileDesktopSignin metric); | |
206 static void LogProfileNewAvatarMenuUpgrade( | |
207 ProfileNewAvatarMenuUpgrade metric); | |
208 static void LogProfileNewAvatarMenuNotYou(ProfileNewAvatarMenuNotYou metric); | |
164 | 209 |
165 #if defined(OS_ANDROID) | 210 #if defined(OS_ANDROID) |
166 static void LogProfileAndroidAccountManagementMenu( | 211 static void LogProfileAndroidAccountManagementMenu( |
167 ProfileAndroidAccountManagementMenu metric, | 212 ProfileAndroidAccountManagementMenu metric, |
168 signin::GAIAServiceType gaia_service); | 213 signin::GAIAServiceType gaia_service); |
169 #endif // defined(OS_ANDROID) | 214 #endif // defined(OS_ANDROID) |
170 | 215 |
171 // These functions should only be called on the UI thread because they hook | 216 // These functions should only be called on the UI thread because they hook |
172 // into g_browser_process through a helper function. | 217 // into g_browser_process through a helper function. |
173 static void LogProfileLaunch(Profile* profile); | 218 static void LogProfileLaunch(Profile* profile); |
174 static void LogProfileSyncSignIn(const base::FilePath& profile_path); | 219 static void LogProfileSyncSignIn(const base::FilePath& profile_path); |
175 static void LogProfileUpdate(const base::FilePath& profile_path); | 220 static void LogProfileUpdate(const base::FilePath& profile_path); |
176 }; | 221 }; |
177 | 222 |
178 | 223 |
179 #endif // CHROME_BROWSER_PROFILES_PROFILE_METRICS_H_ | 224 #endif // CHROME_BROWSER_PROFILES_PROFILE_METRICS_H_ |
OLD | NEW |