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

Unified Diff: base/memory/shared_memory_unittest.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/memory/shared_memory_mac_unittest.cc ('k') | base/memory/shared_memory_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/shared_memory_unittest.cc
diff --git a/base/memory/shared_memory_unittest.cc b/base/memory/shared_memory_unittest.cc
index 059e0193589a9865ffa61dc6a710fafc3d12326e..948a9d0d6c33576fb45e250f8310ecabefa10e43 100644
--- a/base/memory/shared_memory_unittest.cc
+++ b/base/memory/shared_memory_unittest.cc
@@ -2,13 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/memory/shared_memory.h"
+
#include <stddef.h>
#include <stdint.h>
+#include <memory>
+
#include "base/atomicops.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/memory/shared_memory.h"
#include "base/memory/shared_memory_handle.h"
#include "base/process/kill.h"
#include "base/rand_util.h"
@@ -246,8 +248,8 @@ TEST(SharedMemoryTest, MultipleThreads) {
int threadcounts[] = { 1, kNumThreads };
for (size_t i = 0; i < arraysize(threadcounts); i++) {
int numthreads = threadcounts[i];
- scoped_ptr<PlatformThreadHandle[]> thread_handles;
- scoped_ptr<MultipleThreadMain*[]> thread_delegates;
+ std::unique_ptr<PlatformThreadHandle[]> thread_handles;
+ std::unique_ptr<MultipleThreadMain* []> thread_delegates;
thread_handles.reset(new PlatformThreadHandle[numthreads]);
thread_delegates.reset(new MultipleThreadMain*[numthreads]);
@@ -279,8 +281,8 @@ TEST(SharedMemoryTest, AnonymousPrivate) {
bool rv;
const uint32_t kDataSize = 8192;
- scoped_ptr<SharedMemory[]> memories(new SharedMemory[count]);
- scoped_ptr<int*[]> pointers(new int*[count]);
+ std::unique_ptr<SharedMemory[]> memories(new SharedMemory[count]);
+ std::unique_ptr<int* []> pointers(new int*[count]);
ASSERT_TRUE(memories.get());
ASSERT_TRUE(pointers.get());
« no previous file with comments | « base/memory/shared_memory_mac_unittest.cc ('k') | base/memory/shared_memory_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698