Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(284)

Unified Diff: chrome/browser/metrics/histogram_synchronizer.h

Issue 4193008: Cleanup histogram syncronizer a bit... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/metrics/histogram_synchronizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/histogram_synchronizer.h
===================================================================
--- chrome/browser/metrics/histogram_synchronizer.h (revision 64486)
+++ chrome/browser/metrics/histogram_synchronizer.h (working copy)
@@ -60,7 +60,7 @@
// signal the waiting process or call the callback function. Returns true when
// we receive histograms from the last of N renderers that were contacted for
// an update. This is called on IO Thread.
- bool RecordRendererHistogram(int sequence_number);
+ bool DecrementPendingRenderers(int sequence_number);
void SetCallbackTaskToCallAfterGettingHistograms(
MessageLoop* callback_thread, Task* callback_task);
@@ -84,8 +84,8 @@
// singular IO thread and we don't need to worry about locks.
bool IsOnIoThread();
- // This lock_ protects access to sequence number and
- // synchronous_renderers_pending_.
+ // This lock_ protects access to next_sequence_number_,
+ // synchronous_renderers_pending_, and synchronous_sequence_number_.
Lock lock_;
// This condition variable is used to block caller of the synchronous request
@@ -110,27 +110,27 @@
// sure a response from a renderer is associated with the current round of
// requests (and not merely a VERY belated prior response).
// next_available_sequence_number_ is the next available number (used to
- // avoid reuse for a long time).
+ // avoid reuse for a long time). Access is protected by lock_.
int next_available_sequence_number_;
// The sequence number used by the most recent asynchronous update request to
- // contact all renderers.
+ // contact all renderers. Access is only permitted on the IO thread.
int async_sequence_number_;
// The number of renderers that have not yet responded to requests (as part of
- // an asynchronous update).
+ // an asynchronous update). Access is only permitted on the IO thread.
int async_renderers_pending_;
// The time when we were told to start the fetch histograms asynchronously
- // from renderers.
+ // from renderers. Access is only permitted on the IO thread.
base::TimeTicks async_callback_start_time_;
// The sequence number used by the most recent synchronous update request to
- // contact all renderers.
+ // contact all renderers. Protected by lock_.
int synchronous_sequence_number_;
// The number of renderers that have not yet responded to requests (as part of
- // a synchronous update).
+ // a synchronous update). Protected by lock_.
int synchronous_renderers_pending_;
// This singleton instance should be started during the single threaded
« no previous file with comments | « no previous file | chrome/browser/metrics/histogram_synchronizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698