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

Unified Diff: base/metrics/sample_vector.h

Issue 116983004: Change some operations touching counts_[] to be atomic. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years 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 | « base/metrics/histogram_samples.cc ('k') | base/metrics/sample_vector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/sample_vector.h
===================================================================
--- base/metrics/sample_vector.h (revision 242519)
+++ base/metrics/sample_vector.h (working copy)
@@ -46,7 +46,7 @@
private:
FRIEND_TEST_ALL_PREFIXES(HistogramTest, CorruptSampleCounts);
- std::vector<HistogramBase::Count> counts_;
+ std::vector<HistogramBase::AtomicCount> counts_;
// Shares the same BucketRanges with Histogram object.
const BucketRanges* const bucket_ranges_;
@@ -56,7 +56,7 @@
class BASE_EXPORT_PRIVATE SampleVectorIterator : public SampleCountIterator {
public:
- SampleVectorIterator(const std::vector<HistogramBase::Count>* counts,
+ SampleVectorIterator(const std::vector<HistogramBase::AtomicCount>* counts,
const BucketRanges* bucket_ranges);
virtual ~SampleVectorIterator();
@@ -73,7 +73,7 @@
private:
void SkipEmptyBuckets();
- const std::vector<HistogramBase::Count>* counts_;
+ const std::vector<HistogramBase::AtomicCount>* counts_;
const BucketRanges* bucket_ranges_;
size_t index_;
« no previous file with comments | « base/metrics/histogram_samples.cc ('k') | base/metrics/sample_vector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698