summaryrefslogtreecommitdiffstats
path: root/ash/multi_profile_uma.h
diff options
context:
space:
mode:
authortengs@chromium.org <tengs@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-02 19:41:43 +0000
committertengs@chromium.org <tengs@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-02 19:41:43 +0000
commit377958792b16099c8087c2acc254f41bfacadcfc (patch)
tree5b1c34a0cbaefc6fae5d2696630f3f94567c9c29 /ash/multi_profile_uma.h
parent164e7a7f81a837e83900c465d00c2a8f9c33ee37 (diff)
downloadchromium_src-377958792b16099c8087c2acc254f41bfacadcfc.zip
chromium_src-377958792b16099c8087c2acc254f41bfacadcfc.tar.gz
chromium_src-377958792b16099c8087c2acc254f41bfacadcfc.tar.bz2
Log UMA metrics for multiprofile actions.
BUG=297184 Review URL: https://codereview.chromium.org/25098009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226527 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/multi_profile_uma.h')
-rw-r--r--ash/multi_profile_uma.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/ash/multi_profile_uma.h b/ash/multi_profile_uma.h
new file mode 100644
index 0000000..ead66e8
--- /dev/null
+++ b/ash/multi_profile_uma.h
@@ -0,0 +1,43 @@
+// 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.
+
+#ifndef ASH_MULTI_PROFILE_UMA_H_
+#define ASH_MULTI_PROFILE_UMA_H_
+
+#include "ash/ash_export.h"
+#include "base/basictypes.h"
+
+namespace ash {
+
+// Records UMA statistics for multiprofile actions.
+// Note: There is also an action to switch profile windows from the
+// browser frame that is recorded by the "Profile.OpenMethod" metric.
+class ASH_EXPORT MultiProfileUMA {
+ public:
+ // Keep these enums up to date with tools/metrics/histograms/histograms.xml.
+ 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
+ };
+
+ // Record switching the active user and what UI path was taken.
+ static void RecordSwitchActiveUser(SwitchActiveUserAction action);
+
+ // Record signing in a new user and what UI path was taken.
+ static void RecordSigninUser(SigninUserAction action);
+
+ private:
+ DISALLOW_IMPLICIT_CONSTRUCTORS(MultiProfileUMA);
+};
+
+} // namespace ash
+
+#endif // ASH_MULTI_PROFILE_UMA_H_