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 ENROLL_DISPLAY, // The Mirror Promo was displayed | |
86 ENROLL_LAUNCH_TUTORIAL, // The Mirror Promo was displayed | |
guohui
2014/04/25 14:46:50
it is very confusing to have the same comment for
guohui
2014/04/25 14:46:50
launch_tutorial means user clicks the learn more l
Mike Lerman
2014/04/28 14:53:11
Done.
Mike Lerman
2014/04/28 14:53:11
Done.
| |
87 ENROLL_ACCEPT_MIRROR, // Mirror was enabled via the Promo | |
88 ENROLL_CLOSE_PROMO_CARD, // The Promo was dismissed | |
guohui
2014/04/25 14:46:50
there are two tutorial cards, it is no clear which
Mike Lerman
2014/04/28 14:53:11
Done.
| |
89 MIRROR_DISABLE, // Mirror was disabled after having been enabled | |
guohui
2014/04/25 14:46:50
nit: missing . at the end of the sentence.
Mike Lerman
2014/04/28 14:53:11
Done.
| |
90 NUM_PROFILE_ENROLLMENT_METRICS | |
91 }; | |
92 | |
83 static void UpdateReportedProfilesStatistics(ProfileManager* manager); | 93 static void UpdateReportedProfilesStatistics(ProfileManager* manager); |
84 | 94 |
85 static void LogNumberOfProfiles(ProfileManager* manager); | 95 static void LogNumberOfProfiles(ProfileManager* manager); |
86 static void LogProfileAddNewUser(ProfileAdd metric); | 96 static void LogProfileAddNewUser(ProfileAdd metric); |
87 static void LogProfileAvatarSelection(size_t icon_index); | 97 static void LogProfileAvatarSelection(size_t icon_index); |
88 static void LogProfileDeleteUser(ProfileNetUserCounts metric); | 98 static void LogProfileDeleteUser(ProfileNetUserCounts metric); |
89 static void LogProfileOpenMethod(ProfileOpen metric); | 99 static void LogProfileOpenMethod(ProfileOpen metric); |
90 static void LogProfileSwitchGaia(ProfileGaia metric); | 100 static void LogProfileSwitchGaia(ProfileGaia metric); |
91 static void LogProfileSwitchUser(ProfileOpen metric); | 101 static void LogProfileSwitchUser(ProfileOpen metric); |
92 static void LogProfileSyncInfo(ProfileSync metric); | 102 static void LogProfileSyncInfo(ProfileSync metric); |
93 static void LogProfileAuthResult(ProfileAuth metric); | 103 static void LogProfileAuthResult(ProfileAuth metric); |
104 static void LogProfileMirrorEnrollment(ProfileEnrollment metric); | |
94 | 105 |
95 // These functions should only be called on the UI thread because they hook | 106 // These functions should only be called on the UI thread because they hook |
96 // into g_browser_process through a helper function. | 107 // into g_browser_process through a helper function. |
97 static void LogProfileLaunch(Profile* profile); | 108 static void LogProfileLaunch(Profile* profile); |
98 static void LogProfileSyncSignIn(const base::FilePath& profile_path); | 109 static void LogProfileSyncSignIn(const base::FilePath& profile_path); |
99 static void LogProfileUpdate(const base::FilePath& profile_path); | 110 static void LogProfileUpdate(const base::FilePath& profile_path); |
100 }; | 111 }; |
101 | 112 |
102 | 113 |
103 #endif // CHROME_BROWSER_PROFILES_PROFILE_METRICS_H_ | 114 #endif // CHROME_BROWSER_PROFILES_PROFILE_METRICS_H_ |
OLD | NEW |