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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 whether Mirror is enabled and Promo views. | |
84 enum ProfileEnrollment { | |
85 // The Mirror Promo was displayed. | |
86 PROFILE_ENROLLMENT_SHOW_PREVIEW_PROMO, | |
87 // The Learn More button was clicked. | |
88 PROFILE_ENROLLMENT_LAUNCH_LEARN_MORE, | |
89 // Mirror was enabled via the Promo. | |
90 PROFILE_ENROLLMENT_ACCEPT_MIRROR, | |
91 // The Welcome card was dismissed. | |
92 PROFILE_ENROLLMENT_CLOSE_WELCOME_CARD, | |
93 // Mirror was disabled after having been enabled | |
noms (inactive)
2014/04/29 14:27:31
nit: needs a . at the end
Mike Lerman
2014/04/29 20:28:02
Done.
| |
94 PROFILE_ENROLLMENT_DISABLE_MIRROR, | |
95 NUM_PROFILE_ENROLLMENT_METRICS | |
noms (inactive)
2014/04/29 14:27:31
I think enums have to end in a comma
Mike Lerman
2014/04/29 20:28:02
Done.
| |
96 }; | |
97 | |
83 static void UpdateReportedProfilesStatistics(ProfileManager* manager); | 98 static void UpdateReportedProfilesStatistics(ProfileManager* manager); |
84 | 99 |
85 static void LogNumberOfProfiles(ProfileManager* manager); | 100 static void LogNumberOfProfiles(ProfileManager* manager); |
86 static void LogProfileAddNewUser(ProfileAdd metric); | 101 static void LogProfileAddNewUser(ProfileAdd metric); |
87 static void LogProfileAvatarSelection(size_t icon_index); | 102 static void LogProfileAvatarSelection(size_t icon_index); |
88 static void LogProfileDeleteUser(ProfileNetUserCounts metric); | 103 static void LogProfileDeleteUser(ProfileNetUserCounts metric); |
89 static void LogProfileOpenMethod(ProfileOpen metric); | 104 static void LogProfileOpenMethod(ProfileOpen metric); |
90 static void LogProfileSwitchGaia(ProfileGaia metric); | 105 static void LogProfileSwitchGaia(ProfileGaia metric); |
91 static void LogProfileSwitchUser(ProfileOpen metric); | 106 static void LogProfileSwitchUser(ProfileOpen metric); |
92 static void LogProfileSyncInfo(ProfileSync metric); | 107 static void LogProfileSyncInfo(ProfileSync metric); |
93 static void LogProfileAuthResult(ProfileAuth metric); | 108 static void LogProfileAuthResult(ProfileAuth metric); |
109 static void LogProfileMirrorEnrollment(ProfileEnrollment metric); | |
94 | 110 |
95 // These functions should only be called on the UI thread because they hook | 111 // These functions should only be called on the UI thread because they hook |
96 // into g_browser_process through a helper function. | 112 // into g_browser_process through a helper function. |
97 static void LogProfileLaunch(Profile* profile); | 113 static void LogProfileLaunch(Profile* profile); |
98 static void LogProfileSyncSignIn(const base::FilePath& profile_path); | 114 static void LogProfileSyncSignIn(const base::FilePath& profile_path); |
99 static void LogProfileUpdate(const base::FilePath& profile_path); | 115 static void LogProfileUpdate(const base::FilePath& profile_path); |
100 }; | 116 }; |
101 | 117 |
102 | 118 |
103 #endif // CHROME_BROWSER_PROFILES_PROFILE_METRICS_H_ | 119 #endif // CHROME_BROWSER_PROFILES_PROFILE_METRICS_H_ |
OLD | NEW |