Fix UAF in WebSocketDispatcherHost
[chromium-blink-merge.git] / ash / multi_profile_uma.cc
blobcbf3b059a35858bb1d37400a9129a5acbbd7026f
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 #include "ash/multi_profile_uma.h"
7 #include "base/metrics/histogram.h"
9 namespace ash {
11 // static
12 void MultiProfileUMA::RecordSessionMode(SessionMode action) {
13 UMA_HISTOGRAM_ENUMERATION("MultiProfile.SessionMode",
14 action,
15 NUM_SESSION_MODES);
18 // static
19 void MultiProfileUMA::RecordSigninUser(SigninUserAction action) {
20 UMA_HISTOGRAM_ENUMERATION("MultiProfile.SigninUserUIPath",
21 action,
22 NUM_SIGNIN_USER_ACTIONS);
25 // static
26 void MultiProfileUMA::RecordSwitchActiveUser(SwitchActiveUserAction action) {
27 UMA_HISTOGRAM_ENUMERATION("MultiProfile.SwitchActiveUserUIPath",
28 action,
29 NUM_SWITCH_ACTIVE_USER_ACTIONS);
32 // static
33 void MultiProfileUMA::RecordTeleportWindowType(TeleportWindowType window_type) {
34 UMA_HISTOGRAM_ENUMERATION("MultiProfile.TeleportWindowType",
35 window_type,
36 NUM_TELEPORT_WINDOW_TYPES);
39 // static
40 void MultiProfileUMA::RecordTeleportAction(TeleportWindowAction action) {
41 UMA_HISTOGRAM_ENUMERATION("MultiProfile.TeleportWindow",
42 action,
43 NUM_TELEPORT_WINDOW_ACTIONS);
46 // static
47 void MultiProfileUMA::RecordUserCount(int number_of_users) {
48 UMA_HISTOGRAM_COUNTS_100("MultiProfile.UsersPerSession", number_of_users);
51 // static
52 void MultiProfileUMA::RecordDiscardedTab(int number_of_users) {
53 UMA_HISTOGRAM_COUNTS_100("MultiProfile.DiscardedTabsPerUser",
54 number_of_users);
57 } // namespace ash