Index: base/metrics/persistent_histogram_allocator.cc |
diff --git a/base/metrics/persistent_histogram_allocator.cc b/base/metrics/persistent_histogram_allocator.cc |
index cad464227d20276a07aee857aa7b4aef02a0aa6d..c4d8c95d68da1bf7f36eba9c8538e3d790728486 100644 |
--- a/base/metrics/persistent_histogram_allocator.cc |
+++ b/base/metrics/persistent_histogram_allocator.cc |
@@ -117,7 +117,7 @@ PersistentSparseHistogramDataManager::GetSampleMapRecordsWhileLocked( |
return found->second.get(); |
std::unique_ptr<PersistentSampleMapRecords>& samples = sample_records_[id]; |
- samples = WrapUnique(new PersistentSampleMapRecords(this, id)); |
+ samples = MakeUnique<PersistentSampleMapRecords>(this, id); |
return samples.get(); |
} |
@@ -670,9 +670,9 @@ void GlobalHistogramAllocator::CreateWithPersistentMemory( |
size_t page_size, |
uint64_t id, |
StringPiece name) { |
- Set(WrapUnique(new GlobalHistogramAllocator( |
- WrapUnique(new PersistentMemoryAllocator( |
- base, size, page_size, id, name, false))))); |
+ Set(WrapUnique( |
+ new GlobalHistogramAllocator(MakeUnique<PersistentMemoryAllocator>( |
+ base, size, page_size, id, name, false)))); |
} |
// static |
@@ -681,7 +681,7 @@ void GlobalHistogramAllocator::CreateWithLocalMemory( |
uint64_t id, |
StringPiece name) { |
Set(WrapUnique(new GlobalHistogramAllocator( |
- WrapUnique(new LocalPersistentMemoryAllocator(size, id, name))))); |
+ MakeUnique<LocalPersistentMemoryAllocator>(size, id, name)))); |
} |
#if !defined(OS_NACL) |
@@ -709,9 +709,9 @@ void GlobalHistogramAllocator::CreateWithFile( |
return; |
} |
- Set(WrapUnique(new GlobalHistogramAllocator( |
- WrapUnique(new FilePersistentMemoryAllocator( |
- std::move(mmfile), size, id, name, false))))); |
+ Set(WrapUnique( |
+ new GlobalHistogramAllocator(MakeUnique<FilePersistentMemoryAllocator>( |
+ std::move(mmfile), size, id, name, false)))); |
} |
#endif |
@@ -728,9 +728,9 @@ void GlobalHistogramAllocator::CreateWithSharedMemory( |
} |
DCHECK_LE(memory->mapped_size(), size); |
- Set(WrapUnique(new GlobalHistogramAllocator( |
- WrapUnique(new SharedPersistentMemoryAllocator( |
- std::move(memory), 0, StringPiece(), /*readonly=*/false))))); |
+ Set(WrapUnique( |
+ new GlobalHistogramAllocator(MakeUnique<SharedPersistentMemoryAllocator>( |
+ std::move(memory), 0, StringPiece(), /*readonly=*/false)))); |
} |
// static |
@@ -745,9 +745,9 @@ void GlobalHistogramAllocator::CreateWithSharedMemoryHandle( |
return; |
} |
- Set(WrapUnique(new GlobalHistogramAllocator( |
- WrapUnique(new SharedPersistentMemoryAllocator( |
- std::move(shm), 0, StringPiece(), /*readonly=*/false))))); |
+ Set(WrapUnique( |
+ new GlobalHistogramAllocator(MakeUnique<SharedPersistentMemoryAllocator>( |
+ std::move(shm), 0, StringPiece(), /*readonly=*/false)))); |
} |
// static |