| 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 #include "base/time/time.h" | 8 #include "base/time/time.h" |
| 9 | 9 |
| 10 namespace media_router { | 10 namespace media_router { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 SEND_SESSION_BINARY_MESSAGE = 4, | 33 SEND_SESSION_BINARY_MESSAGE = 4, |
| 34 DETACH_ROUTE = 5, | 34 DETACH_ROUTE = 5, |
| 35 START_OBSERVING_MEDIA_SINKS = 6, | 35 START_OBSERVING_MEDIA_SINKS = 6, |
| 36 STOP_OBSERVING_MEDIA_SINKS = 7, | 36 STOP_OBSERVING_MEDIA_SINKS = 7, |
| 37 START_OBSERVING_MEDIA_ROUTES = 8, | 37 START_OBSERVING_MEDIA_ROUTES = 8, |
| 38 STOP_OBSERVING_MEDIA_ROUTES = 9, | 38 STOP_OBSERVING_MEDIA_ROUTES = 9, |
| 39 LISTEN_FOR_ROUTE_MESSAGES = 10, | 39 LISTEN_FOR_ROUTE_MESSAGES = 10, |
| 40 STOP_LISTENING_FOR_ROUTE_MESSAGES = 11, | 40 STOP_LISTENING_FOR_ROUTE_MESSAGES = 11, |
| 41 CONNECTION_ERROR = 12, | 41 CONNECTION_ERROR = 12, |
| 42 REGISTER_MEDIA_ROUTE_PROVIDER = 13, | 42 REGISTER_MEDIA_ROUTE_PROVIDER = 13, |
| 43 CONNECT_ROUTE_BY_ROUTE_ID = 14, |
| 43 | 44 |
| 44 // NOTE: Add entries only immediately above this line. | 45 // NOTE: Add entries only immediately above this line. |
| 45 TOTAL_COUNT = 14 | 46 TOTAL_COUNT = 15 |
| 46 }; | 47 }; |
| 47 | 48 |
| 48 class MediaRouterMetrics { | 49 class MediaRouterMetrics { |
| 49 public: | 50 public: |
| 50 // Records where the user clicked to open the Media Router dialog. | 51 // Records where the user clicked to open the Media Router dialog. |
| 51 static void RecordMediaRouterDialogOrigin( | 52 static void RecordMediaRouterDialogOrigin( |
| 52 MediaRouterDialogOpenOrigin origin); | 53 MediaRouterDialogOpenOrigin origin); |
| 53 | 54 |
| 54 // Records why the media route provider extension was woken up. | 55 // Records why the media route provider extension was woken up. |
| 55 static void RecordMediaRouteProviderWakeReason( | 56 static void RecordMediaRouteProviderWakeReason( |
| 56 MediaRouteProviderWakeReason reason); | 57 MediaRouteProviderWakeReason reason); |
| 57 | 58 |
| 58 // Records the duration it takes for the Media Router dialog to open and | 59 // Records the duration it takes for the Media Router dialog to open and |
| 59 // finish painting after a user clicks to open the dialog. | 60 // finish painting after a user clicks to open the dialog. |
| 60 static void RecordMediaRouterDialogPaint( | 61 static void RecordMediaRouterDialogPaint( |
| 61 const base::TimeDelta delta); | 62 const base::TimeDelta delta); |
| 62 | 63 |
| 63 // Records the duration it takes for the Media Router dialog to load its | 64 // Records the duration it takes for the Media Router dialog to load its |
| 64 // initial data after a user clicks to open the dialog. | 65 // initial data after a user clicks to open the dialog. |
| 65 static void RecordMediaRouterDialogLoaded( | 66 static void RecordMediaRouterDialogLoaded( |
| 66 const base::TimeDelta delta); | 67 const base::TimeDelta delta); |
| 67 }; | 68 }; |
| 68 | 69 |
| 69 } // namespace media_router | 70 } // namespace media_router |
| 70 | 71 |
| 71 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_METRICS_H_ | 72 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_METRICS_H_ |
| OLD | NEW |