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 'Not You?' bubble that users | |
147 // can navigate to from the Upgrade bubble after upgrade. | |
148 enum ProfileNewAvatarMenuNotYou { | |
149 // User views the 'Not You?' bubble. | |
150 PROFILE_AVATAR_MENU_NOT_YOU_VIEW = 0, | |
151 // User selects back from within the 'Not You?' bubble. | |
152 PROFILE_AVATAR_MENU_NOT_YOU_BACK, | |
153 // User adds a person from within the 'Not You?' bubble. | |
154 PROFILE_AVATAR_MENU_NOT_YOU_ADD_PERSON, | |
155 // User chooses to disconnect (sign out) from within the Not You? bubble. | |
msw
2014/08/14 21:24:48
nit: 'Not You?' (nix "disconnect", "(sign out)", o
Mike Lerman
2014/08/15 12:55:46
I had 3 characters to spare :)
| |
156 PROFILE_AVATAR_MENU_NOT_YOU_DISCONNECT, | |
157 NUM_PROFILE_AVATAR_MENU_NOT_YOU_METRICS, | |
158 }; | |
159 | |
160 // Enum for tracking user interactions with the signin bubble that appears | |
161 // in the New Avatar Menu after using the Inline Signin flow. | |
162 enum ProfileNewAvatarMenuSignin { | |
163 // User viewed the signin bubble after successfully using the inline signin. | |
164 PROFILE_AVATAR_MENU_SIGNIN_VIEW = 0, | |
165 // User selected ok to dismiss the signin bubble. | |
166 PROFILE_AVATAR_MENU_SIGNIN_OK, | |
167 // User opened the settings from the signin bubble. | |
168 PROFILE_AVATAR_MENU_SIGNIN_SETTINGS, | |
169 NUM_PROFILE_AVATAR_MENU_SIGNIN_METRICS, | |
170 }; | |
171 | |
172 // Enum for tracking user interactions with the bubble that appears for all | |
173 // users in the new avatar menu after upgrading. | |
174 enum ProfileNewAvatarMenuUpgrade { | |
175 // User views the upgrade bubble. | |
176 PROFILE_AVATAR_MENU_UPGRADE_VIEW = 0, | |
177 // User dismissed the upgrade bubble. | |
178 PROFILE_AVATAR_MENU_UPGRADE_DISMISS, | |
179 // User selects 'What's New' in the upgrade bubble. | |
180 PROFILE_AVATAR_MENU_UPGRADE_WHATS_NEW, | |
181 // User selects 'Not You?' in the upgrade bubble. | |
182 PROFILE_AVATAR_MENU_UPGRADE_NOT_YOU, | |
183 NUM_PROFILE_AVATAR_MENU_UPGRADE_METRICS, | |
184 }; | |
185 | |
146 static void UpdateReportedProfilesStatistics(ProfileManager* manager); | 186 static void UpdateReportedProfilesStatistics(ProfileManager* manager); |
147 // Count and return summary information about the profiles currently in the | 187 // Count and return summary information about the profiles currently in the |
148 // |manager|. This information is returned in the output variable |counts|. | 188 // |manager|. This information is returned in the output variable |counts|. |
149 static bool CountProfileInformation(ProfileManager* manager, | 189 static bool CountProfileInformation(ProfileManager* manager, |
150 ProfileCounts* counts); | 190 ProfileCounts* counts); |
151 | 191 |
152 static void LogNumberOfProfiles(ProfileManager* manager); | 192 static void LogNumberOfProfiles(ProfileManager* manager); |
153 static void LogProfileAddNewUser(ProfileAdd metric); | 193 static void LogProfileAddNewUser(ProfileAdd metric); |
154 static void LogProfileAvatarSelection(size_t icon_index); | 194 static void LogProfileAvatarSelection(size_t icon_index); |
155 static void LogProfileDeleteUser(ProfileDelete metric); | 195 static void LogProfileDeleteUser(ProfileDelete metric); |
156 static void LogProfileOpenMethod(ProfileOpen metric); | 196 static void LogProfileOpenMethod(ProfileOpen metric); |
157 static void LogProfileSwitchGaia(ProfileGaia metric); | 197 static void LogProfileSwitchGaia(ProfileGaia metric); |
158 static void LogProfileSwitchUser(ProfileOpen metric); | 198 static void LogProfileSwitchUser(ProfileOpen metric); |
159 static void LogProfileSyncInfo(ProfileSync metric); | 199 static void LogProfileSyncInfo(ProfileSync metric); |
160 static void LogProfileAuthResult(ProfileAuth metric); | 200 static void LogProfileAuthResult(ProfileAuth metric); |
161 static void LogProfileDesktopMenu(ProfileDesktopMenu metric, | 201 static void LogProfileDesktopMenu(ProfileDesktopMenu metric, |
162 signin::GAIAServiceType gaia_service); | 202 signin::GAIAServiceType gaia_service); |
163 static void LogProfileDelete(bool profile_was_signed_in); | 203 static void LogProfileDelete(bool profile_was_signed_in); |
204 static void LogProfileNewAvatarMenuNotYou(ProfileNewAvatarMenuNotYou metric); | |
205 static void LogProfileNewAvatarMenuSignin(ProfileNewAvatarMenuSignin metric); | |
206 static void LogProfileNewAvatarMenuUpgrade( | |
207 ProfileNewAvatarMenuUpgrade metric); | |
164 | 208 |
165 #if defined(OS_ANDROID) | 209 #if defined(OS_ANDROID) |
166 static void LogProfileAndroidAccountManagementMenu( | 210 static void LogProfileAndroidAccountManagementMenu( |
167 ProfileAndroidAccountManagementMenu metric, | 211 ProfileAndroidAccountManagementMenu metric, |
168 signin::GAIAServiceType gaia_service); | 212 signin::GAIAServiceType gaia_service); |
169 #endif // defined(OS_ANDROID) | 213 #endif // defined(OS_ANDROID) |
170 | 214 |
171 // These functions should only be called on the UI thread because they hook | 215 // These functions should only be called on the UI thread because they hook |
172 // into g_browser_process through a helper function. | 216 // into g_browser_process through a helper function. |
173 static void LogProfileLaunch(Profile* profile); | 217 static void LogProfileLaunch(Profile* profile); |
174 static void LogProfileSyncSignIn(const base::FilePath& profile_path); | 218 static void LogProfileSyncSignIn(const base::FilePath& profile_path); |
175 static void LogProfileUpdate(const base::FilePath& profile_path); | 219 static void LogProfileUpdate(const base::FilePath& profile_path); |
176 }; | 220 }; |
177 | 221 |
178 | 222 |
179 #endif // CHROME_BROWSER_PROFILES_PROFILE_METRICS_H_ | 223 #endif // CHROME_BROWSER_PROFILES_PROFILE_METRICS_H_ |
OLD | NEW |