OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_METRICS_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_METRICS_H_ |
6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_METRICS_H_ | 6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_METRICS_H_ |
7 | 7 |
8 namespace media_router { | 8 namespace media_router { |
9 | 9 |
10 // NOTE: Do not renumber enums as that would confuse interpretation of | 10 // NOTE: Do not renumber enums as that would confuse interpretation of |
11 // previously logged data. When making changes, also update the enum list | 11 // previously logged data. When making changes, also update the enum list |
12 // in tools/metrics/histograms/histograms.xml to keep it in sync. | 12 // in tools/metrics/histograms/histograms.xml to keep it in sync. |
13 | 13 |
14 // Where the user clicked to open the Media Router dialog. | 14 // Where the user clicked to open the Media Router dialog. |
15 enum class MediaRouterDialogOpenOrigin { | 15 enum class MediaRouterDialogOpenOrigin { |
16 TOOLBAR = 0, | 16 TOOLBAR = 0, |
17 OVERFLOW_MENU = 1, | 17 OVERFLOW_MENU = 1, |
18 CONTEXTUAL_MENU = 2, | 18 CONTEXTUAL_MENU = 2, |
19 PAGE = 3, | 19 PAGE = 3, |
20 | 20 |
21 // NOTE: Add entries only immediately above this line. | 21 // NOTE: Add entries only immediately above this line. |
22 TOTAL_COUNT = 4 | 22 TOTAL_COUNT = 4 |
23 }; | 23 }; |
24 | 24 |
25 // Why the Media Route Provider process was woken up. | 25 // Why the Media Route Provider process was woken up. |
26 enum class MediaRouteProviderWakeReason { | 26 enum class MediaRouteProviderWakeReason { |
27 CREATE_ROUTE = 0, | 27 CREATE_ROUTE = 0, |
28 JOIN_ROUTE = 1, | 28 JOIN_ROUTE = 1, |
29 CLOSE_ROUTE = 2, | 29 TERMINATE_ROUTE = 2, |
30 SEND_SESSION_MESSAGE = 3, | 30 SEND_SESSION_MESSAGE = 3, |
31 SEND_SESSION_BINARY_MESSAGE = 4, | 31 SEND_SESSION_BINARY_MESSAGE = 4, |
32 PRESENTATION_SESSION_DETACHED = 5, | 32 DETACH_ROUTE = 5, |
mlamouri (slow - plz ping)
2015/12/10 15:39:51
open question: would there be a benefit in trying
mark a. foltz
2015/12/10 23:46:48
I think for now we should be able to get a good es
| |
33 START_OBSERVING_MEDIA_SINKS = 6, | 33 START_OBSERVING_MEDIA_SINKS = 6, |
34 STOP_OBSERVING_MEDIA_SINKS = 7, | 34 STOP_OBSERVING_MEDIA_SINKS = 7, |
35 START_OBSERVING_MEDIA_ROUTES = 8, | 35 START_OBSERVING_MEDIA_ROUTES = 8, |
36 STOP_OBSERVING_MEDIA_ROUTES = 9, | 36 STOP_OBSERVING_MEDIA_ROUTES = 9, |
37 LISTEN_FOR_ROUTE_MESSAGES = 10, | 37 LISTEN_FOR_ROUTE_MESSAGES = 10, |
38 STOP_LISTENING_FOR_ROUTE_MESSAGES = 11, | 38 STOP_LISTENING_FOR_ROUTE_MESSAGES = 11, |
39 CONNECTION_ERROR = 12, | 39 CONNECTION_ERROR = 12, |
40 REGISTER_MEDIA_ROUTE_PROVIDER = 13, | 40 REGISTER_MEDIA_ROUTE_PROVIDER = 13, |
41 | 41 |
42 // NOTE: Add entries only immediately above this line. | 42 // NOTE: Add entries only immediately above this line. |
43 TOTAL_COUNT = 14 | 43 TOTAL_COUNT = 14 |
44 }; | 44 }; |
45 | 45 |
46 class MediaRouterMetrics { | 46 class MediaRouterMetrics { |
47 public: | 47 public: |
48 // Records where the user clicked to open the Media Router dialog. | 48 // Records where the user clicked to open the Media Router dialog. |
49 static void RecordMediaRouterDialogOrigin( | 49 static void RecordMediaRouterDialogOrigin( |
50 MediaRouterDialogOpenOrigin origin); | 50 MediaRouterDialogOpenOrigin origin); |
51 | 51 |
52 // Records why the media route provider extension was woken up. | 52 // Records why the media route provider extension was woken up. |
53 static void RecordMediaRouteProviderWakeReason( | 53 static void RecordMediaRouteProviderWakeReason( |
54 MediaRouteProviderWakeReason reason); | 54 MediaRouteProviderWakeReason reason); |
55 }; | 55 }; |
56 | 56 |
57 } // namespace media_router | 57 } // namespace media_router |
58 | 58 |
59 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_METRICS_H_ | 59 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_METRICS_H_ |
OLD | NEW |