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

Unified Diff: chrome/browser/profiles/profile_metrics.h

Issue 844193005: Add UMA metrics for profile switching. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use existing histogram and fix issues raised by mlerman@ Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/profiles/profile_metrics.h
diff --git a/chrome/browser/profiles/profile_metrics.h b/chrome/browser/profiles/profile_metrics.h
index ca42813ad7692421169c26a1985fe91312cfb5bd..29b9df096f3839601b333c21c3a78c53ae0acb66 100644
--- a/chrome/browser/profiles/profile_metrics.h
+++ b/chrome/browser/profiles/profile_metrics.h
@@ -67,6 +67,16 @@ class ProfileMetrics {
NUM_PROFILE_OPEN_METRICS
};
+ // Enum for tracking the state of profiles being switched to.
+ enum ProfileOpenState {
+ // Profile being switched to is already opened and has browsers opened.
+ PROFILE_OPENED = 0,
+ // Profile being switched to is already opened but has no browsers opened.
+ PROFILE_OPENED_NO_BROWSER,
+ // Profile being switched to is not opened.
+ PROFILE_UNOPENED
+ };
+
// Enum for getting net counts for adding and deleting users.
enum ProfileNetUserCounts {
ADD_NEW_USER = 0, // Total count of add new user
@@ -206,14 +216,19 @@ class ProfileMetrics {
// |manager|. This information is returned in the output variable |counts|.
static bool CountProfileInformation(ProfileManager* manager,
ProfileCounts* counts);
+ static ProfileOpenState GetProfileOpenState(ProfileManager* manager,
Mike Lerman 2015/01/23 19:46:14 GetProfileOpenState isn't called outside of profil
anthonyvd 2015/01/26 16:07:48 Done.
+ const base::FilePath& path);
+ static void LogNumberOfProfileSwitches();
static void LogNumberOfProfiles(ProfileManager* manager);
static void LogProfileAddNewUser(ProfileAdd metric);
static void LogProfileAvatarSelection(size_t icon_index);
static void LogProfileDeleteUser(ProfileDelete metric);
static void LogProfileOpenMethod(ProfileOpen metric);
+ static void LogProfileSwitch(ProfileOpen metric,
+ ProfileManager* manager,
+ const base::FilePath& profile_path);
static void LogProfileSwitchGaia(ProfileGaia metric);
- static void LogProfileSwitchUser(ProfileOpen metric);
static void LogProfileSyncInfo(ProfileSync metric);
static void LogProfileAuthResult(ProfileAuth metric);
static void LogProfileDesktopMenu(ProfileDesktopMenu metric,

Powered by Google App Engine
This is Rietveld 408576698