| 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 |
| 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 class ProfileMetrics { | 20 class ProfileMetrics { |
| 21 public: | 21 public: |
| 22 // Enum for counting the ways users were added. | 22 // Enum for counting the ways users were added. |
| 23 enum ProfileAdd { | 23 enum ProfileAdd { |
| 24 ADD_NEW_USER_ICON = 0, // User adds new user from icon menu | 24 ADD_NEW_USER_ICON = 0, // User adds new user from icon menu |
| 25 ADD_NEW_USER_MENU, // User adds new user from menu bar | 25 ADD_NEW_USER_MENU, // User adds new user from menu bar |
| 26 ADD_NEW_USER_DIALOG, // User adds new user from create-profile dialog |
| 26 NUM_PROFILE_ADD_METRICS | 27 NUM_PROFILE_ADD_METRICS |
| 27 }; | 28 }; |
| 28 | 29 |
| 29 // Enum for counting the ways user profiles and menus were opened. | 30 // Enum for counting the ways user profiles and menus were opened. |
| 30 enum ProfileOpen { | 31 enum ProfileOpen { |
| 31 NTP_AVATAR_BUBBLE = 0, // User opens avatar icon menu from NTP | 32 NTP_AVATAR_BUBBLE = 0, // User opens avatar icon menu from NTP |
| 32 ICON_AVATAR_BUBBLE, // User opens avatar icon menu from icon | 33 ICON_AVATAR_BUBBLE, // User opens avatar icon menu from icon |
| 33 SWITCH_PROFILE_ICON, // User switches profiles from icon menu | 34 SWITCH_PROFILE_ICON, // User switches profiles from icon menu |
| 34 SWITCH_PROFILE_MENU, // User switches profiles from menu bar | 35 SWITCH_PROFILE_MENU, // User switches profiles from menu bar |
| 35 SWITCH_PROFILE_DOCK, // User switches profiles from dock (Mac-only) | 36 SWITCH_PROFILE_DOCK, // User switches profiles from dock (Mac-only) |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 | 78 |
| 78 // These functions should only be called on the UI thread because they hook | 79 // These functions should only be called on the UI thread because they hook |
| 79 // into g_browser_process through a helper function. | 80 // into g_browser_process through a helper function. |
| 80 static void LogProfileLaunch(Profile* profile); | 81 static void LogProfileLaunch(Profile* profile); |
| 81 static void LogProfileSyncSignIn(const base::FilePath& profile_path); | 82 static void LogProfileSyncSignIn(const base::FilePath& profile_path); |
| 82 static void LogProfileUpdate(const base::FilePath& profile_path); | 83 static void LogProfileUpdate(const base::FilePath& profile_path); |
| 83 }; | 84 }; |
| 84 | 85 |
| 85 | 86 |
| 86 #endif // CHROME_BROWSER_PROFILES_PROFILE_METRICS_H_ | 87 #endif // CHROME_BROWSER_PROFILES_PROFILE_METRICS_H_ |
| OLD | NEW |