[Android] Additional forward_variables_from conversions.
[chromium-blink-merge.git] / ash / multi_profile_uma.h
blob21387b20bf7d11d37689dd326e7fec0eb742e9a0
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.
5 #ifndef ASH_MULTI_PROFILE_UMA_H_
6 #define ASH_MULTI_PROFILE_UMA_H_
8 #include "ash/ash_export.h"
9 #include "base/basictypes.h"
11 namespace ash {
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
26 enum SigninUserAction {
27 SIGNIN_USER_BY_TRAY = 0,
28 SIGNIN_USER_BY_BROWSER_FRAME,
29 NUM_SIGNIN_USER_ACTIONS
32 enum SwitchActiveUserAction {
33 SWITCH_ACTIVE_USER_BY_TRAY = 0,
34 SWITCH_ACTIVE_USER_BY_ACCELERATOR,
35 NUM_SWITCH_ACTIVE_USER_ACTIONS
38 enum TeleportWindowType {
39 TELEPORT_WINDOW_BROWSER = 0,
40 TELEPORT_WINDOW_INCOGNITO_BROWSER,
41 TELEPORT_WINDOW_V1_APP,
42 TELEPORT_WINDOW_V2_APP,
43 TELEPORT_WINDOW_PANEL,
44 TELEPORT_WINDOW_POPUP,
45 TELEPORT_WINDOW_UNKNOWN,
46 NUM_TELEPORT_WINDOW_TYPES
49 enum TeleportWindowAction {
50 TELEPORT_WINDOW_DRAG_AND_DROP = 0,
51 TELEPORT_WINDOW_CAPTION_MENU,
52 TELEPORT_WINDOW_RETURN_BY_MINIMIZE,
53 TELEPORT_WINDOW_RETURN_BY_LAUNCHER,
54 NUM_TELEPORT_WINDOW_ACTIONS
57 // Record the type of user (multi profile) session.
58 static void RecordSessionMode(SessionMode mode);
60 // Record signing in a new user and what UI path was taken.
61 static void RecordSigninUser(SigninUserAction action);
63 // Record switching the active user and what UI path was taken.
64 static void RecordSwitchActiveUser(SwitchActiveUserAction action);
66 // Record the type of window which got teleported to another desk.
67 static void RecordTeleportWindowType(TeleportWindowType window_type);
69 // Record the way and how many times a window got teleported to another desk.
70 static void RecordTeleportAction(TeleportWindowAction action);
72 // Record number of users joined into a session. Called every time a user gets
73 // added.
74 static void RecordUserCount(int number_of_users);
76 // Record a discarded tab in the number of running users bucket.
77 static void RecordDiscardedTab(int number_of_users);
79 private:
80 DISALLOW_IMPLICIT_CONSTRUCTORS(MultiProfileUMA);
83 } // namespace ash
85 #endif // ASH_MULTI_PROFILE_UMA_H_