- add sources.
[platform/framework/web/crosswalk.git] / src / ash / multi_profile_uma.h
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef ASH_MULTI_PROFILE_UMA_H_
6 #define ASH_MULTI_PROFILE_UMA_H_
7
8 #include "ash/ash_export.h"
9 #include "base/basictypes.h"
10
11 namespace ash {
12
13 // Records UMA statistics for multiprofile actions.
14 // Note: There is also an action to switch profile windows from the
15 // browser frame that is recorded by the "Profile.OpenMethod" metric.
16 class ASH_EXPORT MultiProfileUMA {
17  public:
18   // Keep these enums up to date with tools/metrics/histograms/histograms.xml.
19   enum SessionMode {
20     SESSION_SINGLE_USER_MODE = 0,
21     SESSION_SIDE_BY_SIDE_MODE,
22     SESSION_SEPARATE_DESKTOP_MODE,
23     NUM_SESSION_MODES
24   };
25
26   enum SigninUserAction {
27     SIGNIN_USER_BY_TRAY = 0,
28     SIGNIN_USER_BY_BROWSER_FRAME,
29     NUM_SIGNIN_USER_ACTIONS
30   };
31
32   enum SwitchActiveUserAction {
33     SWITCH_ACTIVE_USER_BY_TRAY = 0,
34     SWITCH_ACTIVE_USER_BY_ACCELERATOR,
35     NUM_SWITCH_ACTIVE_USER_ACTIONS
36   };
37
38   enum TeleportWindowAction {
39     TELEPORT_WINDOW_DRAG_AND_DROP = 0,
40     TELEPORT_WINDOW_CAPTION_MENU,
41     TELEPORT_WINDOW_RETURN_BY_MINIMIZE,
42     TELEPORT_WINDOW_RETURN_BY_LAUNCHER,
43     NUM_TELEPORT_WINDOW_ACTIONS
44   };
45
46   // Record the type of user (multi profile) session.
47   static void RecordSessionMode(SessionMode mode);
48
49   // Record signing in a new user and what UI path was taken.
50   static void RecordSigninUser(SigninUserAction action);
51
52   // Record switching the active user and what UI path was taken.
53   static void RecordSwitchActiveUser(SwitchActiveUserAction action);
54
55   // Record the way and how many times a window got teleported to another desk.
56   static void RecordTeleportAction(TeleportWindowAction action);
57
58  private:
59   DISALLOW_IMPLICIT_CONSTRUCTORS(MultiProfileUMA);
60 };
61
62 }  // namespace ash
63
64 #endif  // ASH_MULTI_PROFILE_UMA_H_