summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-28 22:02:46 +0000
committerjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-28 22:02:46 +0000
commitc9a3ef84a7d486d4dd24fe8332b8b83ed833885d (patch)
treee1180399782984b4f1ffd909be6149c5ce1cc736 /base
parentc2a44c4852ad9f800968dcc32e3344c948c2bc88 (diff)
downloadchromium_src-c9a3ef84a7d486d4dd24fe8332b8b83ed833885d.zip
chromium_src-c9a3ef84a7d486d4dd24fe8332b8b83ed833885d.tar.gz
chromium_src-c9a3ef84a7d486d4dd24fe8332b8b83ed833885d.tar.bz2
Automatically adapt to faster/slower uploads of renderer histograms
This replaces the current time based approach (chrome is given N seconds to upload all renederer histograms) with an asynch callback approach that waits until all renderers have responded (with their updates). It uses a fall-back timer to ensure that a hung renderer won't delay things forever as well. This causes faster (and complete) updates in about:histograms as well as generally assuring complete updates during UMA gatherings. This code was contributed by Raman Tenneti in CL 42496 http://codereview.chromium.org/42496 bug=12850 r=raman Review URL: http://codereview.chromium.org/113473 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17123 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/histogram.cc10
-rw-r--r--base/histogram.h4
2 files changed, 1 insertions, 13 deletions
diff --git a/base/histogram.cc b/base/histogram.cc
index 687a549..f50571d 100644
--- a/base/histogram.cc
+++ b/base/histogram.cc
@@ -364,16 +364,6 @@ std::string Histogram::SerializeHistogramInfo(const Histogram& histogram,
}
// static
-void Histogram::DeserializeHistogramList(
- const std::vector<std::string>& histograms) {
- for (std::vector<std::string>::const_iterator it = histograms.begin();
- it < histograms.end();
- ++it) {
- DeserializeHistogramInfo(*it);
- }
-}
-
-// static
bool Histogram::DeserializeHistogramInfo(const std::string& histogram_info) {
if (histogram_info.empty()) {
return false;
diff --git a/base/histogram.h b/base/histogram.h
index 59981ea..3a3ddb1 100644
--- a/base/histogram.h
+++ b/base/histogram.h
@@ -298,9 +298,7 @@ class Histogram {
// The following method accepts a list of pickled histograms and
// builds a histogram and updates shadow copy of histogram data in the
// browser process.
- static void DeserializeHistogramList(
- const std::vector<std::string>& histograms);
- static bool DeserializeHistogramInfo(const std::string& state);
+ static bool DeserializeHistogramInfo(const std::string& histogram_info);
//----------------------------------------------------------------------------