From ef3d8a7b8e5512a42d2d4d1e18d57f370a6f47fe Mon Sep 17 00:00:00 2001
From: "mnaganov@chromium.org"
 <mnaganov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Mon, 7 Sep 2009 07:41:06 +0000
Subject: DevTools profiler: remove code due to WebKit Inspector upstreaming.

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/202003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25597 0039d316-1c4b-4281-b951-d872f2087c98
---
 webkit/glue/devtools/js/devtools.js | 35 +----------------------------------
 1 file changed, 1 insertion(+), 34 deletions(-)

(limited to 'webkit')

diff --git a/webkit/glue/devtools/js/devtools.js b/webkit/glue/devtools/js/devtools.js
index 2520f0f..f47d2cc 100644
--- a/webkit/glue/devtools/js/devtools.js
+++ b/webkit/glue/devtools/js/devtools.js
@@ -159,6 +159,7 @@ WebInspector.loaded = function() {
   devtools.tools.reset();
 
   Preferences.ignoreWhitespace = false;
+  Preferences.samplingCPUProfiler = true;
   oldLoaded.call(this);
 
   // Hide dock button on Mac OS.
@@ -276,40 +277,6 @@ WebInspector.ScriptsPanel.prototype.__defineGetter__(
 })();
 
 
-// As columns in data grid can't be changed after initialization,
-// we need to intercept the constructor and modify columns upon creation.
-(function InterceptDataGridForProfiler() {
-   var originalDataGrid = WebInspector.DataGrid;
-   WebInspector.DataGrid = function(columns) {
-     if (('average' in columns) && ('calls' in columns)) {
-       delete columns['average'];
-       delete columns['calls'];
-     }
-     return new originalDataGrid(columns);
-   };
-})();
-
-
-// WebKit's profiler displays milliseconds with high resolution (shows
-// three digits after the decimal point). We never have such resolution,
-// as our minimal sampling rate is 1 ms. So we are disabling high resolution
-// to avoid visual clutter caused by meaningless ".000" parts.
-(function InterceptTimeDisplayInProfiler() {
-   var originalDataGetter =
-       WebInspector.ProfileDataGridNode.prototype.__lookupGetter__('data');
-   WebInspector.ProfileDataGridNode.prototype.__defineGetter__('data',
-     function() {
-       var oldNumberSecondsToString = Number.secondsToString;
-       Number.secondsToString = function(seconds, formatterFunction) {
-         return oldNumberSecondsToString(seconds, formatterFunction, false);
-       };
-       var data = originalDataGetter.call(this);
-       Number.secondsToString = oldNumberSecondsToString;
-       return data;
-     });
-})();
-
-
 (function InterceptProfilesPanelEvents() {
   var oldShow = WebInspector.ProfilesPanel.prototype.show;
   WebInspector.ProfilesPanel.prototype.show = function() {
-- 
cgit v1.1