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

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

Issue 1672243003: Revert "Devtools: Add metrics for drawer views being shown" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 resources: 2, 65 resources: 2,
66 network: 3, 66 network: 3,
67 sources: 4, 67 sources: 4,
68 timeline: 5, 68 timeline: 5,
69 profiles: 6, 69 profiles: 6,
70 audits: 7, 70 audits: 7,
71 console: 8, 71 console: 8,
72 layers: 9 72 layers: 9
73 } 73 }
74 74
75 WebInspector.UserMetrics._DrawerCodes = {
76 "console": 1,
77 "animations": 2,
78 "network.config": 3,
79 "rendering": 4,
80 "sensors": 5,
81 "sources.search": 6
82 }
83
84 WebInspector.UserMetrics.prototype = { 75 WebInspector.UserMetrics.prototype = {
85 /** 76 /**
86 * @param {string} panelName 77 * @param {string} panelName
87 */ 78 */
88 panelShown: function(panelName) 79 panelShown: function(panelName)
89 { 80 {
90 var code = WebInspector.UserMetrics._PanelCodes[panelName] || 0; 81 var code = WebInspector.UserMetrics._PanelCodes[panelName] || 0;
91 var size = Object.keys(WebInspector.UserMetrics._PanelCodes).length + 1; 82 var size = Object.keys(WebInspector.UserMetrics._PanelCodes).length + 1;
92 InspectorFrontendHost.recordEnumeratedHistogram("DevTools.PanelShown", c ode, size); 83 InspectorFrontendHost.recordEnumeratedHistogram("DevTools.PanelShown", c ode, size);
93 }, 84 },
94 85
95 /** 86 /**
96 * @param {string} viewId
97 */
98 drawerShown: function(viewId)
99 {
100 var code = WebInspector.UserMetrics._DrawerCodes[viewId] || 0;
101 var size = Object.keys(WebInspector.UserMetrics._DrawerCodes).length + 1 ;
102 InspectorFrontendHost.recordEnumeratedHistogram("DevTools.DrawerShown", code, size);
103 },
104
105 /**
106 * @param {!WebInspector.UserMetrics.Action} action 87 * @param {!WebInspector.UserMetrics.Action} action
107 */ 88 */
108 actionTaken: function(action) 89 actionTaken: function(action)
109 { 90 {
110 var size = Object.keys(WebInspector.UserMetrics.Action).length + 1; 91 var size = Object.keys(WebInspector.UserMetrics.Action).length + 1;
111 InspectorFrontendHost.recordEnumeratedHistogram("DevTools.ActionTaken", action, size); 92 InspectorFrontendHost.recordEnumeratedHistogram("DevTools.ActionTaken", action, size);
112 } 93 }
113 } 94 }
114 95
115 /** @type {!WebInspector.UserMetrics} */ 96 /** @type {!WebInspector.UserMetrics} */
116 WebInspector.userMetrics = new WebInspector.UserMetrics(); 97 WebInspector.userMetrics = new WebInspector.UserMetrics();
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/components/Drawer.js ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698