diff options
author | nsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-02 17:43:01 +0000 |
---|---|---|
committer | nsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-02 17:43:01 +0000 |
commit | 32c5b622b862467963b4a250e70355e1f5cec9e5 (patch) | |
tree | 924d711dd06fbffb6144d00973f845d0d62abc01 /base/metrics/histogram_base.cc | |
parent | 419523b4b0778ee5c26fe35a62230cc694a5eccf (diff) | |
download | chromium_src-32c5b622b862467963b4a250e70355e1f5cec9e5.zip chromium_src-32c5b622b862467963b4a250e70355e1f5cec9e5.tar.gz chromium_src-32c5b622b862467963b4a250e70355e1f5cec9e5.tar.bz2 |
Revert 159668 - This broke the reference page cyclers
Original description:
Page cyclers: output memory histograms (approach: expose JS object)
This CL makes the chrome browser expose a JS object for retrieving histograms if a command line flag is passed. Page cycler then gets the histograms by executing JS via the test automation API.
BUG=145352
Review URL: https://chromiumcodereview.appspot.com/10905073
TBR=marja@chromium.org
Review URL: https://codereview.chromium.org/11027020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159724 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/metrics/histogram_base.cc')
-rw-r--r-- | base/metrics/histogram_base.cc | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/base/metrics/histogram_base.cc b/base/metrics/histogram_base.cc index a5fade9..6032a35 100644 --- a/base/metrics/histogram_base.cc +++ b/base/metrics/histogram_base.cc @@ -6,10 +6,6 @@ #include <climits> -#include "base/json/json_string_value_serializer.h" -#include "base/memory/scoped_ptr.h" -#include "base/values.h" - namespace base { const HistogramBase::Sample HistogramBase::kSampleType_MAX = INT_MAX; @@ -28,21 +24,4 @@ void HistogramBase::ClearFlags(int32 flags) { flags_ &= ~flags; } -void HistogramBase::WriteJSON(std::string* output) const { - Count count; - scoped_ptr<ListValue> buckets(new ListValue()); - GetCountAndBucketData(&count, buckets.get()); - scoped_ptr<DictionaryValue> parameters(new DictionaryValue()); - GetParameters(parameters.get()); - - JSONStringValueSerializer serializer(output); - DictionaryValue root; - root.SetString("name", histogram_name()); - root.SetInteger("count", count); - root.SetInteger("flags", flags()); - root.Set("params", parameters.release()); - root.Set("buckets", buckets.release()); - serializer.Serialize(root); -} - } // namespace base |