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

Unified Diff: Source/devtools/front_end/devtools_app/InspectorFrontendHostImpl.js

Issue 1061503002: DevTools: use recordEnumeratedHistogram instead of recordActionTaken (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix inspector/user-metrics.html Created 5 years, 8 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
« no previous file with comments | « LayoutTests/inspector/user-metrics.html ('k') | Source/devtools/front_end/host/InspectorFrontendHost.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/devtools_app/InspectorFrontendHostImpl.js
diff --git a/Source/devtools/front_end/devtools_app/InspectorFrontendHostImpl.js b/Source/devtools/front_end/devtools_app/InspectorFrontendHostImpl.js
index 370a872029bdb73760b93feff37aaf37a21b2a7d..904416f9ca8b9cc550e62fbc1e28f5efdecb18e2 100644
--- a/Source/devtools/front_end/devtools_app/InspectorFrontendHostImpl.js
+++ b/Source/devtools/front_end/devtools_app/InspectorFrontendHostImpl.js
@@ -171,20 +171,13 @@ WebInspector.InspectorFrontendHostImpl.prototype = {
/**
* @override
+ * @param {string} actionName
* @param {number} actionCode
+ * @param {number} bucketSize
*/
- recordActionTaken: function(actionCode)
- {
- DevToolsAPI.sendMessageToEmbedder("recordActionUMA", ["DevTools.ActionTaken", actionCode], null);
- },
-
- /**
- * @override
- * @param {number} panelCode
- */
- recordPanelShown: function(panelCode)
+ recordEnumeratedHistogram: function(actionName, actionCode, bucketSize)
{
- DevToolsAPI.sendMessageToEmbedder("recordActionUMA", ["DevTools.PanelShown", panelCode], null);
+ DevToolsAPI.sendMessageToEmbedder("recordEnumeratedHistogram", [actionName, actionCode, bucketSize], null);
},
/**
@@ -343,6 +336,8 @@ WebInspector.InspectorFrontendHostImpl.prototype = {
return DevToolsHost.isHostedMode();
},
+ // Backward-compatible methods below this line --------------------------------------------
+
/**
* Support for legacy front-ends (<M41).
* @return {string}
@@ -443,5 +438,23 @@ WebInspector.InspectorFrontendHostImpl.prototype = {
*/
close: function(url)
{
+ },
+
+ /**
+ * Support for legacy front-ends (<M44).
+ * @param {number} actionCode
+ */
+ recordActionTaken: function(actionCode)
+ {
+ this.recordEnumeratedHistogram("DevTools.ActionTaken", actionCode, 100);
+ },
+
+ /**
+ * Support for legacy front-ends (<M44).
+ * @param {number} panelCode
+ */
+ recordPanelShown: function(panelCode)
+ {
+ this.recordEnumeratedHistogram("DevTools.PanelShown", panelCode, 20);
}
}
« no previous file with comments | « LayoutTests/inspector/user-metrics.html ('k') | Source/devtools/front_end/host/InspectorFrontendHost.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698