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

Unified Diff: base/debug/activity_tracker.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/debug/activity_analyzer_unittest.cc ('k') | base/debug/activity_tracker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/debug/activity_tracker.cc
diff --git a/base/debug/activity_tracker.cc b/base/debug/activity_tracker.cc
index ca5a6c35f0f3a1dd9d340965a4194aab2b5dee24..dc1f529ad8977946bc20ae1a7f96bb0d9a52b2fb 100644
--- a/base/debug/activity_tracker.cc
+++ b/base/debug/activity_tracker.cc
@@ -481,8 +481,8 @@ void GlobalActivityTracker::CreateWithFile(const FilePath& file_path,
{0, static_cast<int64_t>(size)},
MemoryMappedFile::READ_WRITE_EXTEND);
DCHECK(success);
- CreateWithAllocator(WrapUnique(new FilePersistentMemoryAllocator(
- std::move(mapped_file), size, id, name, false)),
+ CreateWithAllocator(MakeUnique<FilePersistentMemoryAllocator>(
+ std::move(mapped_file), size, id, name, false),
stack_depth);
}
#endif // !defined(OS_NACL)
@@ -493,8 +493,7 @@ void GlobalActivityTracker::CreateWithLocalMemory(size_t size,
StringPiece name,
int stack_depth) {
CreateWithAllocator(
- WrapUnique(new LocalPersistentMemoryAllocator(size, id, name)),
- stack_depth);
+ MakeUnique<LocalPersistentMemoryAllocator>(size, id, name), stack_depth);
}
ThreadActivityTracker* GlobalActivityTracker::CreateTrackerForCurrentThread() {
« no previous file with comments | « base/debug/activity_analyzer_unittest.cc ('k') | base/debug/activity_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698