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

Unified Diff: ash/multi_profile_uma.cc

Issue 25098009: Log UMA metrics for multiprofile actions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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: ash/multi_profile_uma.cc
diff --git a/ash/multi_profile_uma.cc b/ash/multi_profile_uma.cc
new file mode 100644
index 0000000000000000000000000000000000000000..328cccb9e3d5c669f3160912951b19caa24c5a73
--- /dev/null
+++ b/ash/multi_profile_uma.cc
@@ -0,0 +1,59 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ash/multi_profile_uma.h"
+
+#include "base/metrics/histogram.h"
+
+namespace {
+
+enum SwitchActiveUserAction {
+ SWITCH_ACTIVE_USER_BY_TRAY = 0,
+ SWITCH_ACTIVE_USER_BY_ACCELERATOR,
+ NUM_SWITCH_ACTIVE_USER_ACTIONS
+};
+
+enum SigninUserAction {
+ SIGNIN_USER_BY_TRAY = 0,
+ SIGNIN_USER_BY_BROWSER_FRAME,
+ NUM_SIGNIN_USER_ACTIONS
+};
+
+} // namespace
+
+namespace ash {
+
+MultiProfileUMA::MultiProfileUMA() {}
+
+MultiProfileUMA::~MultiProfileUMA() {}
+
+// static
+void MultiProfileUMA::RecordSwitchUserFromTray() {
+ UMA_HISTOGRAM_ENUMERATION("MultiProfile.SwitchActiveUser",
+ SWITCH_ACTIVE_USER_BY_TRAY,
+ NUM_SWITCH_ACTIVE_USER_ACTIONS);
+}
+
+// static
+void MultiProfileUMA::RecordSwitchUserFromAccelerator() {
+ UMA_HISTOGRAM_ENUMERATION("MultiProfile.SwitchActiveUser",
+ SWITCH_ACTIVE_USER_BY_ACCELERATOR,
+ NUM_SWITCH_ACTIVE_USER_ACTIONS);
Ilya Sherman 2013/09/28 00:29:35 Of lines 40-42, lines 40 and 42 are identical to t
Tim Song 2013/09/28 01:35:13 Done.
+}
+
+// static
+void MultiProfileUMA::RecordSigninUserFromTray() {
+ UMA_HISTOGRAM_ENUMERATION("MultiProfile.SigninUser",
+ SIGNIN_USER_BY_TRAY,
+ NUM_SIGNIN_USER_ACTIONS);
+}
+
+// static
+void MultiProfileUMA::RecordSigninUserFromBrowserFrame() {
+ UMA_HISTOGRAM_ENUMERATION("MultiProfile.SigninUser",
+ SIGNIN_USER_BY_BROWSER_FRAME,
+ NUM_SIGNIN_USER_ACTIONS);
+}
+
+} // namespace ash

Powered by Google App Engine
This is Rietveld 408576698