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

Side by Side Diff: Source/devtools/front_end/host/UserMetrics.js

Issue 1061503002: DevTools: use recordEnumeratedHistogram instead of recordActionTaken (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 TogglePrettyPrint: "togglePrettyPrint", 76 TogglePrettyPrint: "togglePrettyPrint",
77 SetBreakpoint: "setBreakpoint", 77 SetBreakpoint: "setBreakpoint",
78 OpenSourceLink: "openSourceLink", 78 OpenSourceLink: "openSourceLink",
79 NetworkSort: "networkSort", 79 NetworkSort: "networkSort",
80 NetworkRequestSelected: "networkRequestSelected", 80 NetworkRequestSelected: "networkRequestSelected",
81 NetworkRequestTabSelected: "networkRequestTabSelected", 81 NetworkRequestTabSelected: "networkRequestTabSelected",
82 HeapSnapshotFilterChanged: "heapSnapshotFilterChanged" 82 HeapSnapshotFilterChanged: "heapSnapshotFilterChanged"
83 }; 83 };
84 84
85 WebInspector.UserMetrics.prototype = { 85 WebInspector.UserMetrics.prototype = {
86 /**
87 * @param {string} panelName
88 */
86 panelShown: function(panelName) 89 panelShown: function(panelName)
87 { 90 {
88 InspectorFrontendHost.recordPanelShown(WebInspector.UserMetrics._PanelCo des[panelName] || 0); 91 var code = WebInspector.UserMetrics._PanelCodes[panelName] || 0;
92 var size = Object.keys(WebInspector.UserMetrics._PanelCodes).length + 1;
93 InspectorFrontendHost.recordUMA("DevTools.PanelShown", code, size);
89 }, 94 },
90 95
91 /** 96 /**
92 * @param {!WebInspector.UserMetrics.Actions} action 97 * @param {!WebInspector.UserMetrics.Actions} action
93 */ 98 */
94 actionTaken: function(action) 99 actionTaken: function(action)
95 { 100 {
96 InspectorFrontendHost.recordActionTaken(action); 101 var size = Object.keys(WebInspector.UserMetrics.Actions).length + 1;
102 InspectorFrontendHost.recordUMA("DevTools.ActionTaken", action, size);
97 } 103 }
98 } 104 }
99 WebInspector.userMetrics = new WebInspector.UserMetrics(); 105 WebInspector.userMetrics = new WebInspector.UserMetrics();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698