OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 | 12 |
13 class FilePath; | 13 class FilePath; |
14 class ProfileManager; | |
14 | 15 |
15 class ProfileMetrics { | 16 class ProfileMetrics { |
16 public: | 17 public: |
17 // Enum for counting the ways users were added. | 18 // Enum for counting the ways users were added. |
18 enum ProfileAdd { | 19 enum ProfileAdd { |
19 ADD_NEW_USER_ICON = 0, // User adds new user from icon menu | 20 ADD_NEW_USER_ICON = 0, // User adds new user from icon menu |
20 ADD_NEW_USER_MENU, // User adds new user from menu bar | 21 ADD_NEW_USER_MENU, // User adds new user from menu bar |
21 NUM_PROFILE_ADD_METRICS | 22 NUM_PROFILE_ADD_METRICS |
22 }; | 23 }; |
23 | 24 |
(...skipping 30 matching lines...) Expand all Loading... | |
54 SECONDARY, // Refers to a user-created profile | 55 SECONDARY, // Refers to a user-created profile |
55 NUM_PROFILE_TYPE_METRICS | 56 NUM_PROFILE_TYPE_METRICS |
56 }; | 57 }; |
57 | 58 |
58 enum ProfileGaia { | 59 enum ProfileGaia { |
59 GAIA_OPT_IN = 0, // User changed to GAIA photo as avatar | 60 GAIA_OPT_IN = 0, // User changed to GAIA photo as avatar |
60 GAIA_OPT_OUT, // User changed to not use GAIA photo as avatar | 61 GAIA_OPT_OUT, // User changed to not use GAIA photo as avatar |
61 NUM_PROFILE_GAIA_METRICS | 62 NUM_PROFILE_GAIA_METRICS |
62 }; | 63 }; |
63 | 64 |
65 enum ProfileEvent { | |
66 STARTUP_PROFILE_EVENT = 0, | |
67 ADD_PROFILE_EVENT, | |
68 DELETE_PROFILE_EVENT | |
69 }; | |
70 | |
71 static void LogNumberOfProfiles(ProfileManager* manager, | |
72 ProfileEvent startup); | |
73 static void LogProfileAddNewUser(ProfileAdd metric); | |
64 static void LogProfileAvatarSelection(size_t icon_index); | 74 static void LogProfileAvatarSelection(size_t icon_index); |
75 static void LogProfileDeleteUser(ProfileNetUserCounts metric); | |
65 static void LogProfileOpenMethod(ProfileOpen metric); | 76 static void LogProfileOpenMethod(ProfileOpen metric); |
66 static void LogProfileAddNewUser(ProfileAdd metric); | 77 static void LogProfileSwitchGaia(ProfileGaia metric); |
67 static void LogProfileSwitchUser(ProfileOpen metric); | 78 static void LogProfileSwitchUser(ProfileOpen metric); |
68 static void LogProfileDeleteUser(ProfileNetUserCounts metric); | |
69 static void LogProfileSyncInfo(ProfileSync metric); | 79 static void LogProfileSyncInfo(ProfileSync metric); |
70 static void LogProfileUpdate(FilePath& profile_path); | 80 |
71 static void LogProfileSyncSignIn(FilePath& profile_path); | 81 // These functions should only be called on the UI thread because they hook |
72 static void LogProfileSwitchGaia(ProfileGaia metric); | 82 // into g_browser_process through a helper function. |
jar (doing other things)
2011/12/10 22:07:44
If it was worth commenting... it is probably worth
rpetterson
2011/12/11 08:46:12
There is already one there. See line 20 of profile
| |
83 static void LogProfileLaunch(const FilePath& profile_path); | |
84 static void LogProfileSyncSignIn(const FilePath& profile_path); | |
85 static void LogProfileUpdate(const FilePath& profile_path); | |
73 }; | 86 }; |
74 | 87 |
75 | 88 |
76 #endif // CHROME_BROWSER_PROFILES_PROFILE_METRICS_H_ | 89 #endif // CHROME_BROWSER_PROFILES_PROFILE_METRICS_H_ |
OLD | NEW |