summaryrefslogtreecommitdiffstats
path: root/chrome/common/histogram_synchronizer.h
diff options
context:
space:
mode:
authorjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-12 00:51:10 +0000
committerjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-12 00:51:10 +0000
commit4ea7e031cd7b6cc68f509c45bcbd3f7a52d53897 (patch)
treeae6ae1a66c0e28071a9a2206c682c3931514d78d /chrome/common/histogram_synchronizer.h
parent010ea08a647dfdc4c75aaab2fca65128f50f2379 (diff)
downloadchromium_src-4ea7e031cd7b6cc68f509c45bcbd3f7a52d53897.zip
chromium_src-4ea7e031cd7b6cc68f509c45bcbd3f7a52d53897.tar.gz
chromium_src-4ea7e031cd7b6cc68f509c45bcbd3f7a52d53897.tar.bz2
Gather histogram data from render into browser before renderer shutdown
We're currently losing histogram data gathered in the renderer when we shut down the renderer. We were only gathering it for UMA about every 20 minutes, and also getting an update when the user visits about:histograms. This change causes the render to push a final update to the browser when the renderer is about to terminate. This is almost exactly CL 160153 http://codereview.chromium.org/160153/show being landed for Raman Tenneti. Per discussion with Darin, I ended up moving the renderer call to send the histograms to the next function, which allows it to be called later (often after the running of the on-unload handler, potentially gathering a bit more data). bug=16495 r=ramanTenneti Review URL: http://codereview.chromium.org/258017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28692 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/histogram_synchronizer.h')
-rw-r--r--chrome/common/histogram_synchronizer.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/chrome/common/histogram_synchronizer.h b/chrome/common/histogram_synchronizer.h
index ed866fc..29c34e2 100644
--- a/chrome/common/histogram_synchronizer.h
+++ b/chrome/common/histogram_synchronizer.h
@@ -32,6 +32,15 @@ class HistogramSynchronizer : public
SYNCHRONOUS_HISTOGRAMS
};
+ // We reserve 0 through 9 sequence numbers for special purposes. For example,
+ // sequence number 0 is used by renderer to send its histograms before it
+ // closing renderer. We wanted to reserve the rest of sequence numbers for
+ // future purposes.
+ enum SequenceNumbers {
+ RENDERER_CLOSING_SEQUENCE_NUMBER = 0,
+ STARTING_SEQUENCE_NUMBER = 10
+ };
+
HistogramSynchronizer();
~HistogramSynchronizer();