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

Unified Diff: base/metrics/persistent_histogram_allocator_unittest.cc

Issue 2258713003: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 3 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_histogram_allocator.cc ('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_histogram_allocator_unittest.cc
diff --git a/base/metrics/persistent_histogram_allocator_unittest.cc b/base/metrics/persistent_histogram_allocator_unittest.cc
index 6f9ed96481cace40703b884a5e06890e33385944..9604ce6b39b14e704b93996a420eca73fc0ea0ad 100644
--- a/base/metrics/persistent_histogram_allocator_unittest.cc
+++ b/base/metrics/persistent_histogram_allocator_unittest.cc
@@ -102,9 +102,8 @@ TEST_F(PersistentHistogramAllocatorTest, CreateAndIterateTest) {
// Create a second allocator and have it access the memory of the first.
std::unique_ptr<HistogramBase> recovered;
- PersistentHistogramAllocator recovery(
- WrapUnique(new PersistentMemoryAllocator(
- allocator_memory_.get(), kAllocatorMemorySize, 0, 0, "", false)));
+ PersistentHistogramAllocator recovery(MakeUnique<PersistentMemoryAllocator>(
+ allocator_memory_.get(), kAllocatorMemorySize, 0, 0, "", false));
PersistentHistogramAllocator::Iterator histogram_iter(&recovery);
recovered = histogram_iter.GetNext();
@@ -181,9 +180,8 @@ TEST_F(PersistentHistogramAllocatorTest, StatisticsRecorderTest) {
// Create a second allocator and have it access the memory of the first.
std::unique_ptr<HistogramBase> recovered;
- PersistentHistogramAllocator recovery(
- WrapUnique(new PersistentMemoryAllocator(
- allocator_memory_.get(), kAllocatorMemorySize, 0, 0, "", false)));
+ PersistentHistogramAllocator recovery(MakeUnique<PersistentMemoryAllocator>(
+ allocator_memory_.get(), kAllocatorMemorySize, 0, 0, "", false));
PersistentHistogramAllocator::Iterator histogram_iter(&recovery);
recovered = histogram_iter.GetNext();
« no previous file with comments | « base/metrics/persistent_histogram_allocator.cc ('k') | base/metrics/persistent_sample_map_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698