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

Unified Diff: base/metrics/histogram.cc

Issue 895853003: Update from https://crrev.com/314320 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 | « base/message_loop/message_pump_win.cc ('k') | base/prefs/json_pref_store.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « base/message_loop/message_pump_win.cc ('k') | base/prefs/json_pref_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698