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

Unified Diff: content/child/child_shared_bitmap_manager.cc

Issue 2254173002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
Index: content/child/child_shared_bitmap_manager.cc
diff --git a/content/child/child_shared_bitmap_manager.cc b/content/child/child_shared_bitmap_manager.cc
index 32ff1632861e5dac7736eecd9ce875923e3baba9..00b461c7e96baad1d89e7d8717ff523cdaf132b4 100644
--- a/content/child/child_shared_bitmap_manager.cc
+++ b/content/child/child_shared_bitmap_manager.cc
@@ -117,7 +117,7 @@ ChildSharedBitmapManager::AllocateSharedMemoryBitmap(const gfx::Size& size) {
// Shutdown path, so use EXIT_SUCCESS. https://crbug.com/615121.
exit(EXIT_SUCCESS);
}
- memory = base::WrapUnique(new base::SharedMemory(handle, false));
+ memory = base::MakeUnique<base::SharedMemory>(handle, false);
if (!memory->Map(memory_size))
CollectMemoryUsageAndDie(size, memory_size);
#else
@@ -142,8 +142,7 @@ ChildSharedBitmapManager::AllocateSharedMemoryBitmap(const gfx::Size& size) {
sender_->Send(new ChildProcessHostMsg_AllocatedSharedBitmap(
memory_size, handle_to_send, id));
#endif
- return base::WrapUnique(
- new ChildSharedBitmap(sender_, std::move(memory), id));
+ return base::MakeUnique<ChildSharedBitmap>(sender_, std::move(memory), id);
}
std::unique_ptr<cc::SharedBitmap>
@@ -164,7 +163,7 @@ ChildSharedBitmapManager::GetBitmapForSharedMemory(base::SharedMemory* mem) {
sender_->Send(new ChildProcessHostMsg_AllocatedSharedBitmap(
mem->mapped_size(), handle_to_send, id));
- return base::WrapUnique(new ChildSharedBitmap(sender_, mem, id));
+ return base::MakeUnique<ChildSharedBitmap>(sender_, mem, id);
}
} // namespace content
« no previous file with comments | « content/child/child_discardable_shared_memory_manager.cc ('k') | content/child/indexed_db/webidbcursor_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698