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

Unified Diff: sandbox/linux/seccomp-bpf/bpf_tester_compatibility_delegate.h

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
Index: sandbox/linux/seccomp-bpf/bpf_tester_compatibility_delegate.h
diff --git a/sandbox/linux/seccomp-bpf/bpf_tester_compatibility_delegate.h b/sandbox/linux/seccomp-bpf/bpf_tester_compatibility_delegate.h
index 00d415c3fc5c93196213046375915a946821a682..a4315ba3c2fbe72a95630ea524c2ecd98e11f887 100644
--- a/sandbox/linux/seccomp-bpf/bpf_tester_compatibility_delegate.h
+++ b/sandbox/linux/seccomp-bpf/bpf_tester_compatibility_delegate.h
@@ -5,8 +5,9 @@
#ifndef SANDBOX_LINUX_SECCOMP_BPF_BPF_TESTER_COMPATIBILITY_DELEGATE_H_
#define SANDBOX_LINUX_SECCOMP_BPF_BPF_TESTER_COMPATIBILITY_DELEGATE_H_
+#include <memory>
+
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "sandbox/linux/seccomp-bpf/sandbox_bpf_test_runner.h"
namespace sandbox {
@@ -28,12 +29,12 @@ class BPFTesterCompatibilityDelegate : public BPFTesterDelegate {
~BPFTesterCompatibilityDelegate() override {}
- scoped_ptr<bpf_dsl::Policy> GetSandboxBPFPolicy() override {
+ std::unique_ptr<bpf_dsl::Policy> GetSandboxBPFPolicy() override {
// The current method is guaranteed to only run in the child process
// running the test. In this process, the current object is guaranteed
// to live forever. So it's ok to pass aux_pointer_for_policy_ to
// the policy, which could in turn pass it to the kernel via Trap().
- return scoped_ptr<bpf_dsl::Policy>(new Policy(&aux_));
+ return std::unique_ptr<bpf_dsl::Policy>(new Policy(&aux_));
}
void RunTestFunction() override {
« no previous file with comments | « sandbox/linux/integration_tests/seccomp_broker_process_unittest.cc ('k') | sandbox/linux/seccomp-bpf/bpf_tests.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698