Index: base/metrics/histogram.cc |
diff --git a/base/metrics/histogram.cc b/base/metrics/histogram.cc |
index fe5b6e6117cb7069c5263ee673be0e2126ad7cc0..42ced3d0abc2d366d7c077c349d5ff91c00f64fe 100644 |
--- a/base/metrics/histogram.cc |
+++ b/base/metrics/histogram.cc |
@@ -369,7 +369,7 @@ HistogramBase* Histogram::DeserializeInfoImpl(PickleIterator* iter) { |
scoped_ptr<SampleVector> Histogram::SnapshotSampleVector() const { |
scoped_ptr<SampleVector> samples(new SampleVector(bucket_ranges())); |
samples->Add(*samples_); |
- return samples; |
+ return samples.Pass(); |
} |
void Histogram::WriteAsciiImpl(bool graph_it, |
@@ -495,13 +495,13 @@ void Histogram::GetCountAndBucketData(Count* count, |
*sum = snapshot->sum(); |
size_t index = 0; |
for (size_t i = 0; i < bucket_count(); ++i) { |
- Sample count = snapshot->GetCountAtIndex(i); |
- if (count > 0) { |
+ Sample count_at_index = snapshot->GetCountAtIndex(i); |
+ if (count_at_index > 0) { |
scoped_ptr<DictionaryValue> bucket_value(new DictionaryValue()); |
bucket_value->SetInteger("low", ranges(i)); |
if (i != bucket_count() - 1) |
bucket_value->SetInteger("high", ranges(i + 1)); |
- bucket_value->SetInteger("count", count); |
+ bucket_value->SetInteger("count", count_at_index); |
buckets->Set(index, bucket_value.release()); |
++index; |
} |