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 |