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

Unified Diff: components/nacl/loader/nonsfi/nonsfi_sandbox_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 | « no previous file | mojo/shell/runner/host/linux_sandbox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/loader/nonsfi/nonsfi_sandbox_unittest.cc
diff --git a/components/nacl/loader/nonsfi/nonsfi_sandbox_unittest.cc b/components/nacl/loader/nonsfi/nonsfi_sandbox_unittest.cc
index c6ba01daa9ce524c056434d742c2445c8f4c65c5..998cd3bd51d22964120ff17f477c57561b760b48 100644
--- a/components/nacl/loader/nonsfi/nonsfi_sandbox_unittest.cc
+++ b/components/nacl/loader/nonsfi/nonsfi_sandbox_unittest.cc
@@ -25,6 +25,8 @@
#include <time.h>
#include <unistd.h>
+#include <memory>
+
#include "base/at_exit.h"
#include "base/bind.h"
#include "base/callback.h"
@@ -607,14 +609,14 @@ class TgkillDelegate : public sandbox::BPFTesterDelegate {
TgkillDelegate() {}
~TgkillDelegate() override {}
- scoped_ptr<sandbox::bpf_dsl::Policy> GetSandboxBPFPolicy() override {
+ std::unique_ptr<sandbox::bpf_dsl::Policy> GetSandboxBPFPolicy() override {
// These two values must be obtained when running in the sandboxed process.
// They cannot be set in the constructor and are also not available from
// within |RunTestFunction|.
pid_ = getpid();
tid_ = syscall(__NR_gettid);
- return scoped_ptr<sandbox::bpf_dsl::Policy>(
+ return std::unique_ptr<sandbox::bpf_dsl::Policy>(
new nacl::nonsfi::NaClNonSfiBPFSandboxPolicy());
}
« no previous file with comments | « no previous file | mojo/shell/runner/host/linux_sandbox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698