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

Unified Diff: sandbox/linux/syscall_broker/broker_process_unittest.cc

Issue 1849323003: Convert //sandbox to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixup nonsfi_sandbox_unittest.cc 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 | « sandbox/linux/syscall_broker/broker_process.cc ('k') | sandbox/mac/bootstrap_sandbox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/syscall_broker/broker_process_unittest.cc
diff --git a/sandbox/linux/syscall_broker/broker_process_unittest.cc b/sandbox/linux/syscall_broker/broker_process_unittest.cc
index c760084ea792635c3b6a5b431faa8a86a2d60caa..229764a8b8d9d61bbb8c75831ddad61a53f02537 100644
--- a/sandbox/linux/syscall_broker/broker_process_unittest.cc
+++ b/sandbox/linux/syscall_broker/broker_process_unittest.cc
@@ -15,6 +15,7 @@
#include <unistd.h>
#include <algorithm>
+#include <memory>
#include <string>
#include <vector>
@@ -23,7 +24,6 @@
#include "base/files/scoped_file.h"
#include "base/logging.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/posix/eintr_wrapper.h"
#include "base/posix/unix_domain_socket_linux.h"
#include "sandbox/linux/syscall_broker/broker_client.h"
@@ -58,7 +58,8 @@ TEST(BrokerProcess, CreateAndDestroy) {
std::vector<BrokerFilePermission> permissions;
permissions.push_back(BrokerFilePermission::ReadOnly("/proc/cpuinfo"));
- scoped_ptr<BrokerProcess> open_broker(new BrokerProcess(EPERM, permissions));
+ std::unique_ptr<BrokerProcess> open_broker(
+ new BrokerProcess(EPERM, permissions));
ASSERT_TRUE(open_broker->Init(base::Bind(&NoOpCallback)));
ASSERT_TRUE(TestUtils::CurrentProcessHasChildren());
@@ -251,7 +252,7 @@ void TestBadPaths(bool fast_check_in_client) {
std::vector<BrokerFilePermission> permissions;
permissions.push_back(BrokerFilePermission::ReadOnlyRecursive("/proc/"));
- scoped_ptr<BrokerProcess> open_broker(
+ std::unique_ptr<BrokerProcess> open_broker(
new BrokerProcess(EPERM, permissions, fast_check_in_client));
ASSERT_TRUE(open_broker->Init(base::Bind(&NoOpCallback)));
// Open cpuinfo via the broker.
@@ -310,7 +311,7 @@ void TestOpenCpuinfo(bool fast_check_in_client, bool recursive) {
else
permissions.push_back(BrokerFilePermission::ReadOnly(kFileCpuInfo));
- scoped_ptr<BrokerProcess> open_broker(
+ std::unique_ptr<BrokerProcess> open_broker(
new BrokerProcess(EPERM, permissions, fast_check_in_client));
ASSERT_TRUE(open_broker->Init(base::Bind(&NoOpCallback)));
« no previous file with comments | « sandbox/linux/syscall_broker/broker_process.cc ('k') | sandbox/mac/bootstrap_sandbox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698