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

Unified Diff: sandbox/linux/suid/client/setuid_sandbox_host_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/suid/client/setuid_sandbox_host.cc ('k') | sandbox/linux/syscall_broker/broker_process.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/suid/client/setuid_sandbox_host_unittest.cc
diff --git a/sandbox/linux/suid/client/setuid_sandbox_host_unittest.cc b/sandbox/linux/suid/client/setuid_sandbox_host_unittest.cc
index 8415abb0643e82c7d409382f8194053f13b09630..efbd9311ca6a5da6cfdd1ea9db602bee85ecbf4b 100644
--- a/sandbox/linux/suid/client/setuid_sandbox_host_unittest.cc
+++ b/sandbox/linux/suid/client/setuid_sandbox_host_unittest.cc
@@ -4,11 +4,11 @@
#include "sandbox/linux/suid/client/setuid_sandbox_host.h"
+#include <memory>
#include <string>
#include "base/environment.h"
#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
#include "base/strings/string_number_conversions.h"
#include "sandbox/linux/suid/common/sandbox.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -17,7 +17,7 @@ namespace sandbox {
TEST(SetuidSandboxHost, SetupLaunchEnvironment) {
const char kTestValue[] = "This is a test";
- scoped_ptr<base::Environment> env(base::Environment::Create());
+ std::unique_ptr<base::Environment> env(base::Environment::Create());
EXPECT_TRUE(env != NULL);
std::string saved_ld_preload;
@@ -28,7 +28,7 @@ TEST(SetuidSandboxHost, SetupLaunchEnvironment) {
EXPECT_TRUE(env->SetVar("LD_PRELOAD", kTestValue));
EXPECT_TRUE(env->UnSetVar("LD_ORIGIN_PATH"));
- scoped_ptr<SetuidSandboxHost> sandbox_host(SetuidSandboxHost::Create());
+ std::unique_ptr<SetuidSandboxHost> sandbox_host(SetuidSandboxHost::Create());
EXPECT_TRUE(sandbox_host != NULL);
// Make sure the environment is clean.
@@ -64,7 +64,7 @@ TEST(SetuidSandboxHost, SetupLaunchEnvironment) {
// This test doesn't accomplish much, but will make sure that analysis tools
// will run this codepath.
TEST(SetuidSandboxHost, GetSandboxBinaryPath) {
- scoped_ptr<SetuidSandboxHost> setuid_sandbox_host(
+ std::unique_ptr<SetuidSandboxHost> setuid_sandbox_host(
SetuidSandboxHost::Create());
ignore_result(setuid_sandbox_host->GetSandboxBinaryPath());
}
« no previous file with comments | « sandbox/linux/suid/client/setuid_sandbox_host.cc ('k') | sandbox/linux/syscall_broker/broker_process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698