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

Unified Diff: base/metrics/histogram.cc

Issue 655003004: Use scoped_ptr::Pass instead of scoped_ptr::PassAs<T>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 | « base/memory/discardable_memory_win.cc ('k') | base/metrics/sparse_histogram.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 0a4fcc043d4a9c983ae69dc4352d216adc1176fb..fe5b6e6117cb7069c5263ee673be0e2126ad7cc0 100644
--- a/base/metrics/histogram.cc
+++ b/base/metrics/histogram.cc
@@ -268,7 +268,7 @@ void Histogram::Add(int value) {
}
scoped_ptr<HistogramSamples> Histogram::SnapshotSamples() const {
- return SnapshotSampleVector().PassAs<HistogramSamples>();
+ return SnapshotSampleVector().Pass();
}
void Histogram::AddSamples(const HistogramSamples& samples) {
@@ -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.Pass();
+ return samples;
danakj 2014/10/15 17:20:08 Oh that's cool I didn't realize we can do that now
}
void Histogram::WriteAsciiImpl(bool graph_it,
« no previous file with comments | « base/memory/discardable_memory_win.cc ('k') | base/metrics/sparse_histogram.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698