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

Unified Diff: base/metrics/persistent_sample_map.cc

Issue 1852433005: Convert //base to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase after r384946 Created 4 years, 8 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/metrics/persistent_sample_map.h ('k') | base/metrics/persistent_sample_map_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/persistent_sample_map.cc
diff --git a/base/metrics/persistent_sample_map.cc b/base/metrics/persistent_sample_map.cc
index 014a86528e7b8e8b5c6eabbe5e0069b60e53cf92..ae8ff321a7768e6e3a87615e169b3c7a4d898055 100644
--- a/base/metrics/persistent_sample_map.cc
+++ b/base/metrics/persistent_sample_map.cc
@@ -5,6 +5,7 @@
#include "base/metrics/persistent_sample_map.h"
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "base/stl_util.h"
namespace base {
@@ -135,11 +136,11 @@ Count PersistentSampleMap::TotalCount() const {
return count;
}
-scoped_ptr<SampleCountIterator> PersistentSampleMap::Iterator() const {
+std::unique_ptr<SampleCountIterator> PersistentSampleMap::Iterator() const {
// Have to override "const" in order to make sure all samples have been
// loaded before trying to iterate over the map.
const_cast<PersistentSampleMap*>(this)->ImportSamples(kAllSamples);
- return make_scoped_ptr(new PersistentSampleMapIterator(sample_counts_));
+ return WrapUnique(new PersistentSampleMapIterator(sample_counts_));
}
bool PersistentSampleMap::AddSubtractImpl(SampleCountIterator* iter,
« no previous file with comments | « base/metrics/persistent_sample_map.h ('k') | base/metrics/persistent_sample_map_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698