diff options
author | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-12 00:51:10 +0000 |
---|---|---|
committer | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-12 00:51:10 +0000 |
commit | 4ea7e031cd7b6cc68f509c45bcbd3f7a52d53897 (patch) | |
tree | ae6ae1a66c0e28071a9a2206c682c3931514d78d /chrome/common/histogram_synchronizer.cc | |
parent | 010ea08a647dfdc4c75aaab2fca65128f50f2379 (diff) | |
download | chromium_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.cc')
-rw-r--r-- | chrome/common/histogram_synchronizer.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/chrome/common/histogram_synchronizer.cc b/chrome/common/histogram_synchronizer.cc index 54ff230..aaf23e8 100644 --- a/chrome/common/histogram_synchronizer.cc +++ b/chrome/common/histogram_synchronizer.cc @@ -241,6 +241,8 @@ int HistogramSynchronizer::GetNextAvaibleSequenceNumber( RendererHistogramRequester requester) { AutoLock auto_lock(lock_); ++next_available_sequence_number_; + if (next_available_sequence_number_ < STARTING_SEQUENCE_NUMBER) + next_available_sequence_number_ = STARTING_SEQUENCE_NUMBER; if (requester == ASYNC_HISTOGRAMS) { async_sequence_number_ = next_available_sequence_number_; async_renderers_pending_ = 0; |