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

Unified Diff: base/test/test_discardable_memory_allocator.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/test/test_discardable_memory_allocator.h ('k') | base/test/test_mock_time_task_runner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/test_discardable_memory_allocator.cc
diff --git a/base/test/test_discardable_memory_allocator.cc b/base/test/test_discardable_memory_allocator.cc
index 0f8e8ce3f7bf93ef7779f50d043d6046548a8ee7..cd96149aefdc4d0de8c63b2d3fe7499a7efd34b3 100644
--- a/base/test/test_discardable_memory_allocator.cc
+++ b/base/test/test_discardable_memory_allocator.cc
@@ -9,6 +9,7 @@
#include "base/logging.h"
#include "base/memory/discardable_memory.h"
+#include "base/memory/ptr_util.h"
namespace base {
namespace {
@@ -46,7 +47,7 @@ class DiscardableMemoryImpl : public DiscardableMemory {
private:
bool is_locked_ = true;
- scoped_ptr<uint8_t[]> data_;
+ std::unique_ptr<uint8_t[]> data_;
size_t size_;
};
@@ -58,9 +59,9 @@ TestDiscardableMemoryAllocator::TestDiscardableMemoryAllocator() {
TestDiscardableMemoryAllocator::~TestDiscardableMemoryAllocator() {
}
-scoped_ptr<DiscardableMemory>
+std::unique_ptr<DiscardableMemory>
TestDiscardableMemoryAllocator::AllocateLockedDiscardableMemory(size_t size) {
- return make_scoped_ptr(new DiscardableMemoryImpl(size));
+ return WrapUnique(new DiscardableMemoryImpl(size));
}
} // namespace base
« no previous file with comments | « base/test/test_discardable_memory_allocator.h ('k') | base/test/test_mock_time_task_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698