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

Unified Diff: third_party/WebKit/Source/devtools/front_end/host/UserMetrics.js

Issue 1520403004: Devtools: Add metrics for drawer views being shown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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: third_party/WebKit/Source/devtools/front_end/host/UserMetrics.js
diff --git a/third_party/WebKit/Source/devtools/front_end/host/UserMetrics.js b/third_party/WebKit/Source/devtools/front_end/host/UserMetrics.js
index 5f0ccb789899ff26ba627455437a7e141b64dc3b..9f2672b70d51ddf0f3a4ea2befca811d9eb957bc 100644
--- a/third_party/WebKit/Source/devtools/front_end/host/UserMetrics.js
+++ b/third_party/WebKit/Source/devtools/front_end/host/UserMetrics.js
@@ -71,6 +71,15 @@ WebInspector.UserMetrics._PanelCodes = {
layers: 9
}
+WebInspector.UserMetrics._DrawerCodes = {
+ "console": 1,
+ "animations": 2,
+ "network.config": 3,
+ "rendering": 4,
+ "sensors": 5,
+ "sources.search": 6
+}
+
WebInspector.UserMetrics.prototype = {
/**
* @param {string} panelName
@@ -83,6 +92,16 @@ WebInspector.UserMetrics.prototype = {
},
/**
+ * @param {string} viewId
+ */
+ drawerShown: function(viewId)
+ {
+ var code = WebInspector.UserMetrics._DrawerCodes[viewId] || 0;
+ var size = Object.keys(WebInspector.UserMetrics._DrawerCodes).length + 1;
+ InspectorFrontendHost.recordEnumeratedHistogram("DevTools.DrawerShown", code, size);
+ },
+
+ /**
* @param {!WebInspector.UserMetrics.Action} action
*/
actionTaken: function(action)

Powered by Google App Engine
This is Rietveld 408576698