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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 /** 5 /**
6 * @constructor 6 * @constructor
7 * @implements {InspectorFrontendHostAPI} 7 * @implements {InspectorFrontendHostAPI}
8 */ 8 */
9 WebInspector.InspectorFrontendHostImpl = function() 9 WebInspector.InspectorFrontendHostImpl = function()
10 { 10 {
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 * @override 164 * @override
165 * @param {string} message 165 * @param {string} message
166 */ 166 */
167 sendMessageToBackend: function(message) 167 sendMessageToBackend: function(message)
168 { 168 {
169 DevToolsHost.sendMessageToBackend(message); 169 DevToolsHost.sendMessageToBackend(message);
170 }, 170 },
171 171
172 /** 172 /**
173 * @override 173 * @override
174 * @param {string} actionName
174 * @param {number} actionCode 175 * @param {number} actionCode
176 * @param {number} bucketSize
175 */ 177 */
176 recordActionTaken: function(actionCode) 178 recordEnumeratedHistogram: function(actionName, actionCode, bucketSize)
177 { 179 {
178 DevToolsAPI.sendMessageToEmbedder("recordActionUMA", ["DevTools.ActionTa ken", actionCode], null); 180 DevToolsAPI.sendMessageToEmbedder("recordEnumeratedHistogram", [actionNa me, actionCode, bucketSize], null);
179 }, 181 },
180 182
181 /** 183 /**
182 * @override
183 * @param {number} panelCode
184 */
185 recordPanelShown: function(panelCode)
186 {
187 DevToolsAPI.sendMessageToEmbedder("recordActionUMA", ["DevTools.PanelSho wn", panelCode], null);
188 },
189
190 /**
191 * @override 184 * @override
192 */ 185 */
193 requestFileSystems: function() 186 requestFileSystems: function()
194 { 187 {
195 DevToolsAPI.sendMessageToEmbedder("requestFileSystems", [], null); 188 DevToolsAPI.sendMessageToEmbedder("requestFileSystems", [], null);
196 }, 189 },
197 190
198 /** 191 /**
199 * @override 192 * @override
200 */ 193 */
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 329
337 /** 330 /**
338 * @override 331 * @override
339 * @return {boolean} 332 * @return {boolean}
340 */ 333 */
341 isHostedMode: function() 334 isHostedMode: function()
342 { 335 {
343 return DevToolsHost.isHostedMode(); 336 return DevToolsHost.isHostedMode();
344 }, 337 },
345 338
339 // Backward-compatible methods below this line ----------------------------- ---------------
340
346 /** 341 /**
347 * Support for legacy front-ends (<M41). 342 * Support for legacy front-ends (<M41).
348 * @return {string} 343 * @return {string}
349 */ 344 */
350 port: function() 345 port: function()
351 { 346 {
352 return "unknown"; 347 return "unknown";
353 }, 348 },
354 349
355 /** 350 /**
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 { 431 {
437 return ""; 432 return "";
438 }, 433 },
439 434
440 /** 435 /**
441 * Support for legacy front-ends (<M28). 436 * Support for legacy front-ends (<M28).
442 * @param {string} url 437 * @param {string} url
443 */ 438 */
444 close: function(url) 439 close: function(url)
445 { 440 {
441 },
442
443 /**
444 * Support for legacy front-ends (<M44).
445 * @param {number} actionCode
446 */
447 recordActionTaken: function(actionCode)
448 {
449 this.recordEnumeratedHistogram("DevTools.ActionTaken", actionCode, 100);
450 },
451
452 /**
453 * Support for legacy front-ends (<M44).
454 * @param {number} panelCode
455 */
456 recordPanelShown: function(panelCode)
457 {
458 this.recordEnumeratedHistogram("DevTools.PanelShown", panelCode, 20);
446 } 459 }
447 } 460 }
OLDNEW
« 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