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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 // form. See sync_setup_handler.h. | 54 // form. See sync_setup_handler.h. |
55 enum ProfileSync { | 55 enum ProfileSync { |
56 SYNC_CUSTOMIZE = 0, // User decided to customize sync | 56 SYNC_CUSTOMIZE = 0, // User decided to customize sync |
57 SYNC_CHOOSE, // User chose what to sync | 57 SYNC_CHOOSE, // User chose what to sync |
58 SYNC_ENCRYPT, // User has chosen to encrypt all data | 58 SYNC_ENCRYPT, // User has chosen to encrypt all data |
59 SYNC_PASSPHRASE, // User is using a passphrase | 59 SYNC_PASSPHRASE, // User is using a passphrase |
60 NUM_PROFILE_SYNC_METRICS | 60 NUM_PROFILE_SYNC_METRICS |
61 }; | 61 }; |
62 | 62 |
63 enum ProfileType { | 63 enum ProfileType { |
64 ORIGINAL = 0, // Refers to the original/default profile | 64 ORIGINAL = 0, // Refers to the original/default profile |
65 SECONDARY, // Refers to a user-created profile | 65 SECONDARY, // Refers to a user-created profile |
66 NUM_PROFILE_TYPE_METRICS | 66 NUM_PROFILE_TYPE_METRICS |
67 }; | 67 }; |
68 | 68 |
69 enum ProfileGaia { | 69 enum ProfileGaia { |
70 GAIA_OPT_IN = 0, // User changed to GAIA photo as avatar | 70 GAIA_OPT_IN = 0, // User changed to GAIA photo as avatar |
71 GAIA_OPT_OUT, // User changed to not use GAIA photo as avatar | 71 GAIA_OPT_OUT, // User changed to not use GAIA photo as avatar |
72 NUM_PROFILE_GAIA_METRICS | 72 NUM_PROFILE_GAIA_METRICS |
73 }; | 73 }; |
74 | 74 |
75 enum ProfileAuth { | 75 enum ProfileAuth { |
76 AUTH_UNNECESSARY, // Profile was not locked | 76 AUTH_UNNECESSARY, // Profile was not locked |
77 AUTH_LOCAL, // Profile was authenticated locally | 77 AUTH_LOCAL, // Profile was authenticated locally |
78 AUTH_ONLINE, // Profile was authenticated on-line | 78 AUTH_ONLINE, // Profile was authenticated on-line |
79 AUTH_FAILED, // Profile failed authentication | 79 AUTH_FAILED, // Profile failed authentication |
80 NUM_PROFILE_AUTH_METRICS | 80 NUM_PROFILE_AUTH_METRICS |
81 }; | 81 }; |
82 | 82 |
| 83 // Enum for tracking if new profile management is enabled and Promo views. |
| 84 // This is used in a histogram; the items should not be removed or re-ordered. |
| 85 enum ProfileUpgradeEnrollment { |
| 86 // User viewed the Upgrade promo card in the user menu. |
| 87 PROFILE_ENROLLMENT_SHOW_PREVIEW_PROMO, |
| 88 // User selected to view the intro tutorial. |
| 89 PROFILE_ENROLLMENT_LAUNCH_LEARN_MORE, |
| 90 // User opted into New Profile Management via Promo card. |
| 91 PROFILE_ENROLLMENT_ACCEPT_NEW_PROFILE_MGMT, |
| 92 // User closed the Upgrade card. |
| 93 PROFILE_ENROLLMENT_CLOSE_WELCOME_CARD, |
| 94 // Used disabled New Profile Management. |
| 95 PROFILE_ENROLLMENT_DISABLE_NEW_PROFILE_MGMT, |
| 96 NUM_PROFILE_ENROLLMENT_METRICS, |
| 97 }; |
| 98 |
83 static void UpdateReportedProfilesStatistics(ProfileManager* manager); | 99 static void UpdateReportedProfilesStatistics(ProfileManager* manager); |
84 | 100 |
85 static void LogNumberOfProfiles(ProfileManager* manager); | 101 static void LogNumberOfProfiles(ProfileManager* manager); |
86 static void LogProfileAddNewUser(ProfileAdd metric); | 102 static void LogProfileAddNewUser(ProfileAdd metric); |
87 static void LogProfileAvatarSelection(size_t icon_index); | 103 static void LogProfileAvatarSelection(size_t icon_index); |
88 static void LogProfileDeleteUser(ProfileNetUserCounts metric); | 104 static void LogProfileDeleteUser(ProfileNetUserCounts metric); |
89 static void LogProfileOpenMethod(ProfileOpen metric); | 105 static void LogProfileOpenMethod(ProfileOpen metric); |
90 static void LogProfileSwitchGaia(ProfileGaia metric); | 106 static void LogProfileSwitchGaia(ProfileGaia metric); |
91 static void LogProfileSwitchUser(ProfileOpen metric); | 107 static void LogProfileSwitchUser(ProfileOpen metric); |
92 static void LogProfileSyncInfo(ProfileSync metric); | 108 static void LogProfileSyncInfo(ProfileSync metric); |
93 static void LogProfileAuthResult(ProfileAuth metric); | 109 static void LogProfileAuthResult(ProfileAuth metric); |
| 110 static void LogProfileUpgradeEnrollment(ProfileUpgradeEnrollment metric); |
94 | 111 |
95 // These functions should only be called on the UI thread because they hook | 112 // These functions should only be called on the UI thread because they hook |
96 // into g_browser_process through a helper function. | 113 // into g_browser_process through a helper function. |
97 static void LogProfileLaunch(Profile* profile); | 114 static void LogProfileLaunch(Profile* profile); |
98 static void LogProfileSyncSignIn(const base::FilePath& profile_path); | 115 static void LogProfileSyncSignIn(const base::FilePath& profile_path); |
99 static void LogProfileUpdate(const base::FilePath& profile_path); | 116 static void LogProfileUpdate(const base::FilePath& profile_path); |
100 }; | 117 }; |
101 | 118 |
102 | 119 |
103 #endif // CHROME_BROWSER_PROFILES_PROFILE_METRICS_H_ | 120 #endif // CHROME_BROWSER_PROFILES_PROFILE_METRICS_H_ |
OLD | NEW |