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

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

Issue 588143007: sandbox: Convert remaining legacy tests to use policy classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Respond to jln@ feedback Created 6 years, 3 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/seccomp-bpf/bpf_tests_unittest.cc ('k') | sandbox/linux/seccomp-bpf/syscall_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/seccomp-bpf/sandbox_bpf_compatibility_policy.h
diff --git a/sandbox/linux/seccomp-bpf/sandbox_bpf_compatibility_policy.h b/sandbox/linux/seccomp-bpf/sandbox_bpf_compatibility_policy.h
deleted file mode 100644
index e9cb9b0345eb96247137819a6980a4aa0e3c816f..0000000000000000000000000000000000000000
--- a/sandbox/linux/seccomp-bpf/sandbox_bpf_compatibility_policy.h
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef SANDBOX_LINUX_SECCOMP_BPF_SANDBOX_BPF_COMPATIBILITY_POLICY_H_
-#define SANDBOX_LINUX_SECCOMP_BPF_SANDBOX_BPF_COMPATIBILITY_POLICY_H_
-
-#include "base/logging.h"
-#include "base/macros.h"
-#include "sandbox/linux/seccomp-bpf/sandbox_bpf.h"
-#include "sandbox/linux/seccomp-bpf/sandbox_bpf_policy.h"
-
-namespace sandbox {
-
-// This class allows compatibility with the old, deprecated
-// policies that were designed for SetSandboxPolicyDeprecated().
-template <class AuxType>
-class CompatibilityPolicy : public SandboxBPFPolicy {
- public:
- typedef ErrorCode (*SyscallEvaluator)(SandboxBPF* sandbox_compiler,
- int system_call_number,
- AuxType* aux);
- CompatibilityPolicy(SyscallEvaluator syscall_evaluator, AuxType* aux)
- : syscall_evaluator_(syscall_evaluator), aux_(aux) {}
-
- virtual ~CompatibilityPolicy() {}
-
- virtual ErrorCode EvaluateSyscall(SandboxBPF* sandbox_compiler,
- int system_call_number) const OVERRIDE {
- DCHECK(SandboxBPF::IsValidSyscallNumber(system_call_number));
- return syscall_evaluator_(sandbox_compiler, system_call_number, aux_);
- }
-
- private:
- SyscallEvaluator syscall_evaluator_;
- AuxType* aux_;
- DISALLOW_COPY_AND_ASSIGN(CompatibilityPolicy);
-};
-
-} // namespace sandbox
-
-#endif // SANDBOX_LINUX_SECCOMP_BPF_SANDBOX_BPF_COMPATIBILITY_POLICY_H_
« no previous file with comments | « sandbox/linux/seccomp-bpf/bpf_tests_unittest.cc ('k') | sandbox/linux/seccomp-bpf/syscall_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698