Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: chrome/browser/profiles/profile_metrics.h

Issue 288493008: UMA Metrics for the user menu, including vasquette-detection (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Split user-menu data based on GAIA service type Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 12
13 class Profile; 13 class Profile;
14 class ProfileManager; 14 class ProfileManager;
15 15
16 namespace base { 16 namespace base {
17 class FilePath; 17 class FilePath;
18 } 18 }
19 19
20 namespace signin {
21 enum GAIA_SERVICE_TYPE;
22 }
23
20 class ProfileMetrics { 24 class ProfileMetrics {
21 public: 25 public:
22 // Enum for counting the ways users were added. 26 // Enum for counting the ways users were added.
23 enum ProfileAdd { 27 enum ProfileAdd {
24 ADD_NEW_USER_ICON = 0, // User adds new user from icon menu 28 ADD_NEW_USER_ICON = 0, // User adds new user from icon menu
25 ADD_NEW_USER_MENU, // User adds new user from menu bar 29 ADD_NEW_USER_MENU, // User adds new user from menu bar
26 ADD_NEW_USER_DIALOG, // User adds new user from create-profile dialog 30 ADD_NEW_USER_DIALOG, // User adds new user from create-profile dialog
27 ADD_NEW_USER_MANAGER, // User adds new user from User Manager 31 ADD_NEW_USER_MANAGER, // User adds new user from User Manager
28 NUM_PROFILE_ADD_METRICS 32 NUM_PROFILE_ADD_METRICS
29 }; 33 };
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 PROFILE_ENROLLMENT_LAUNCH_LEARN_MORE, 93 PROFILE_ENROLLMENT_LAUNCH_LEARN_MORE,
90 // User opted into New Profile Management via Promo card. 94 // User opted into New Profile Management via Promo card.
91 PROFILE_ENROLLMENT_ACCEPT_NEW_PROFILE_MGMT, 95 PROFILE_ENROLLMENT_ACCEPT_NEW_PROFILE_MGMT,
92 // User closed the Upgrade card. 96 // User closed the Upgrade card.
93 PROFILE_ENROLLMENT_CLOSE_WELCOME_CARD, 97 PROFILE_ENROLLMENT_CLOSE_WELCOME_CARD,
94 // Used disabled New Profile Management. 98 // Used disabled New Profile Management.
95 PROFILE_ENROLLMENT_DISABLE_NEW_PROFILE_MGMT, 99 PROFILE_ENROLLMENT_DISABLE_NEW_PROFILE_MGMT,
96 NUM_PROFILE_ENROLLMENT_METRICS, 100 NUM_PROFILE_ENROLLMENT_METRICS,
97 }; 101 };
98 102
103 // Enum for tracking user interactions with the user menu and user manager.
104 // Interactions initiated from the content area are logged into a different
105 // histogram from those that were initiated from the avatar button.
106 // An example of the interaction beginning in the content area is
107 // clicking "Manage Accounts" within account selection on a Google property.
108 enum ProfileDesktopMenu {
109 // User opened the user menu, and clicked lock.
110 PROFILE_DESKTOP_MENU_LOCK = 0,
111 // User opened the user menu, and started removing an account.
guohui 2014/05/22 20:20:49 i think its more interesting to log the actual acc
Mike Lerman 2014/05/23 17:15:36 Done.
112 PROFILE_DESKTOP_MENU_REMOVE_ACCT,
113 // User opened the user menu, and started adding an account.
114 PROFILE_DESKTOP_MENU_ADD_ACCT,
115 NUM_PROFILE_DESKTOP_MENU_METRICS,
116 };
guohui 2014/05/22 20:20:49 its also interesting to log clicking "not you" and
Mike Lerman 2014/05/23 17:15:36 I'm planning to do so in a new CL. Should I add a
117
99 static void UpdateReportedProfilesStatistics(ProfileManager* manager); 118 static void UpdateReportedProfilesStatistics(ProfileManager* manager);
100 119
101 static void LogNumberOfProfiles(ProfileManager* manager); 120 static void LogNumberOfProfiles(ProfileManager* manager);
102 static void LogProfileAddNewUser(ProfileAdd metric); 121 static void LogProfileAddNewUser(ProfileAdd metric);
103 static void LogProfileAvatarSelection(size_t icon_index); 122 static void LogProfileAvatarSelection(size_t icon_index);
104 static void LogProfileDeleteUser(ProfileNetUserCounts metric); 123 static void LogProfileDeleteUser(ProfileNetUserCounts metric);
105 static void LogProfileOpenMethod(ProfileOpen metric); 124 static void LogProfileOpenMethod(ProfileOpen metric);
106 static void LogProfileSwitchGaia(ProfileGaia metric); 125 static void LogProfileSwitchGaia(ProfileGaia metric);
107 static void LogProfileSwitchUser(ProfileOpen metric); 126 static void LogProfileSwitchUser(ProfileOpen metric);
108 static void LogProfileSyncInfo(ProfileSync metric); 127 static void LogProfileSyncInfo(ProfileSync metric);
109 static void LogProfileAuthResult(ProfileAuth metric); 128 static void LogProfileAuthResult(ProfileAuth metric);
110 static void LogProfileUpgradeEnrollment(ProfileUpgradeEnrollment metric); 129 static void LogProfileUpgradeEnrollment(ProfileUpgradeEnrollment metric);
130 static void LogProfileDesktopMenu(ProfileDesktopMenu metric,
131 signin::GAIA_SERVICE_TYPE gaia_service);
111 132
112 // These functions should only be called on the UI thread because they hook 133 // These functions should only be called on the UI thread because they hook
113 // into g_browser_process through a helper function. 134 // into g_browser_process through a helper function.
114 static void LogProfileLaunch(Profile* profile); 135 static void LogProfileLaunch(Profile* profile);
115 static void LogProfileSyncSignIn(const base::FilePath& profile_path); 136 static void LogProfileSyncSignIn(const base::FilePath& profile_path);
116 static void LogProfileUpdate(const base::FilePath& profile_path); 137 static void LogProfileUpdate(const base::FilePath& profile_path);
117 }; 138 };
118 139
119 140
120 #endif // CHROME_BROWSER_PROFILES_PROFILE_METRICS_H_ 141 #endif // CHROME_BROWSER_PROFILES_PROFILE_METRICS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698