Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5111)

Unified Diff: chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js

Issue 2915983002: [Media Router] Add UMA metrics to record the load time for route controls (Closed)
Patch Set: . Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js
diff --git a/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js b/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js
index 4163d7874352a9c66a7defd31fc2ab93e2a42e13..f994f9213b33daae5865b2127ae005dc7e1ffb98 100644
--- a/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js
+++ b/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js
@@ -253,6 +253,15 @@ Polymer({
},
/**
+ * The time at which the route details view was first opened.
+ * @private {?Date}
+ */
+ routeDetailsOpenTime_: {
+ type: Date,
+ value: null,
+ },
+
+ /**
* The list of current routes.
* @type {!Array<!media_router.Route>|undefined}
*/
@@ -2310,6 +2319,9 @@ Polymer({
* @private
*/
showRouteDetails_: function(route) {
+ if (!this.routeDetailsOpenTime_) {
+ this.routeDetailsOpenTime_ = new Date();
imcheng 2017/06/02 23:53:13 Use Date.now() to get back a number instead of a D
takumif 2017/06/03 01:31:14 Done.
+ }
this.currentRoute_ = route;
this.currentView_ = media_router.MediaRouterView.ROUTE_DETAILS;
if (this.useWebUiRouteControls) {

Powered by Google App Engine
This is Rietveld 408576698