Index: base/metrics/sample_vector.cc |
diff --git a/base/metrics/sample_vector.cc b/base/metrics/sample_vector.cc |
index 327a1f2900dbb858f17751a4f9f0d7411bf8d4b3..f90d80bd38759a803656413e3d3d145e4443a5b0 100644 |
--- a/base/metrics/sample_vector.cc |
+++ b/base/metrics/sample_vector.cc |
@@ -53,7 +53,7 @@ scoped_ptr<SampleCountIterator> SampleVector::Iterator() const { |
} |
bool SampleVector::AddSubtractImpl(SampleCountIterator* iter, |
- HistogramSamples::Instruction instruction) { |
+ HistogramSamples::Operator op) { |
HistogramBase::Sample min; |
HistogramBase::Sample max; |
HistogramBase::Count count; |
@@ -65,8 +65,7 @@ bool SampleVector::AddSubtractImpl(SampleCountIterator* iter, |
if (min == bucket_ranges_->range(index) && |
max == bucket_ranges_->range(index + 1)) { |
// Sample matches this bucket! |
- counts_[index] += |
- (instruction == HistogramSamples::ADD) ? count : -count; |
+ counts_[index] += (op == HistogramSamples::ADD) ? count : -count; |
iter->Next(); |
} else if (min > bucket_ranges_->range(index)) { |
// Sample is larger than current bucket range. Try next. |
@@ -117,6 +116,8 @@ SampleVectorIterator::SampleVectorIterator(const vector<Count>* counts, |
SkipEmptyBuckets(); |
} |
+SampleVectorIterator::~SampleVectorIterator() {} |
+ |
bool SampleVectorIterator::Done() const { |
return index_ >= counts_->size(); |
} |