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

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

Issue 288493008: UMA Metrics for the user menu, including vasquette-detection (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/profiles/profile_metrics.h ('k') | chrome/browser/signin/signin_global_error.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_metrics.cc
diff --git a/chrome/browser/profiles/profile_metrics.cc b/chrome/browser/profiles/profile_metrics.cc
index a829be238793e76afa1d163b7239a18873845578..66211dd8a739f7d1fa4cf20207c4f832dd168c15 100644
--- a/chrome/browser/profiles/profile_metrics.cc
+++ b/chrome/browser/profiles/profile_metrics.cc
@@ -11,6 +11,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_info_cache.h"
#include "chrome/browser/profiles/profile_manager.h"
+#include "chrome/browser/signin/signin_header_helper.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/installer/util/google_update_settings.h"
#include "content/public/browser/browser_thread.h"
@@ -295,6 +296,40 @@ void ProfileMetrics::LogProfileUpgradeEnrollment(
NUM_PROFILE_ENROLLMENT_METRICS);
}
+void ProfileMetrics::LogProfileDesktopMenu(
+ ProfileDesktopMenu metric,
+ signin::GAIAServiceType gaia_service) {
+ // The first parameter to the histogram needs to be literal, because of the
+ // optimized implementation of |UMA_HISTOGRAM_ENUMERATION|. Do not attempt
+ // to refactor.
+ switch (gaia_service) {
+ case signin::GAIA_SERVICE_TYPE_NONE:
+ UMA_HISTOGRAM_ENUMERATION("Profile.DesktopMenu.NonGAIA", metric,
+ NUM_PROFILE_DESKTOP_MENU_METRICS);
+ break;
+ case signin::GAIA_SERVICE_TYPE_SIGNOUT:
+ UMA_HISTOGRAM_ENUMERATION("Profile.DesktopMenu.GAIASignout", metric,
+ NUM_PROFILE_DESKTOP_MENU_METRICS);
+ break;
+ case signin::GAIA_SERVICE_TYPE_SIGNOUTOPTIONS_INCOGNITO:
+ UMA_HISTOGRAM_ENUMERATION("Profile.DesktopMenu.GAIASignoutIncognito",
+ metric, NUM_PROFILE_DESKTOP_MENU_METRICS);
+ break;
+ case signin::GAIA_SERVICE_TYPE_ADDSESSION:
+ UMA_HISTOGRAM_ENUMERATION("Profile.DesktopMenu.GAIAAddSession", metric,
+ NUM_PROFILE_DESKTOP_MENU_METRICS);
+ break;
+ case signin::GAIA_SERVICE_TYPE_REAUTH:
+ UMA_HISTOGRAM_ENUMERATION("Profile.DesktopMenu.GAIAReAuth", metric,
+ NUM_PROFILE_DESKTOP_MENU_METRICS);
+ break;
+ case signin::GAIA_SERVICE_TYPE_DEFAULT:
+ UMA_HISTOGRAM_ENUMERATION("Profile.DesktopMenu.GAIADefault", metric,
+ NUM_PROFILE_DESKTOP_MENU_METRICS);
+ break;
+ }
+}
+
void ProfileMetrics::LogProfileLaunch(Profile* profile) {
base::FilePath profile_path = profile->GetPath();
UMA_HISTOGRAM_ENUMERATION("Profile.LaunchBrowser",
« no previous file with comments | « chrome/browser/profiles/profile_metrics.h ('k') | chrome/browser/signin/signin_global_error.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698