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

Unified Diff: content/common/sandbox_linux/sandbox_bpf_base_policy_linux.h

Issue 114483003: Revert of Linux Sandbox: split the GPU policies to their own file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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: content/common/sandbox_linux/sandbox_bpf_base_policy_linux.h
diff --git a/content/common/sandbox_linux/sandbox_bpf_base_policy_linux.h b/content/common/sandbox_linux/sandbox_bpf_base_policy_linux.h
deleted file mode 100644
index 6d9d83f4fa1f81827085e87df28f05a3fd9184cb..0000000000000000000000000000000000000000
--- a/content/common/sandbox_linux/sandbox_bpf_base_policy_linux.h
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2013 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 CONTENT_COMMON_SANDBOX_LINUX_SANDBOX_BPF_BASE_POLICY_LINUX_H_
-#define CONTENT_COMMON_SANDBOX_LINUX_SANDBOX_BPF_BASE_POLICY_LINUX_H_
-
-#include "base/basictypes.h"
-#include "base/memory/scoped_ptr.h"
-#include "sandbox/linux/seccomp-bpf-helpers/baseline_policy.h"
-#include "sandbox/linux/seccomp-bpf/sandbox_bpf_policy.h"
-
-using sandbox::ErrorCode;
-using sandbox::SandboxBPF;
-
-namespace content {
-
-// The "baseline" BPF policy for content/. Any content/ seccomp-bpf policy
-// should inherit from it.
-// It implements the main SandboxBPFPolicy interface. Due to its nature
-// as a "kernel attack surface reduction" layer, it's implementation-defined.
-class SandboxBPFBasePolicy : public sandbox::SandboxBPFPolicy {
- public:
- SandboxBPFBasePolicy();
- virtual ~SandboxBPFBasePolicy();
-
- virtual ErrorCode EvaluateSyscall(SandboxBPF* sandbox_compiler,
- int system_call_number) const OVERRIDE;
-
- // A policy can implement this hook to run code right before the policy
- // is passed to the SandboxBPF class and the sandbox is engaged.
- // If PreSandboxHook() returns true, the sandbox is guaranteed to be
- // engaged afterwards.
- // This will be used when enabling the sandbox though
- // SandboxSeccompBPF::StartSandbox().
- virtual bool PreSandboxHook();
-
- // Get the errno(3) to return for filesystem errors.
- static int GetFSDeniedErrno();
-
- private:
- // Compose the BaselinePolicy from sandbox/.
- scoped_ptr<sandbox::BaselinePolicy> baseline_policy_;
- DISALLOW_COPY_AND_ASSIGN(SandboxBPFBasePolicy);
-};
-
-} // namespace content
-
-#endif // CONTENT_COMMON_SANDBOX_LINUX_SANDBOX_BPF_BASE_POLICY_LINUX_H_
« no previous file with comments | « content/common/sandbox_linux/bpf_gpu_policy_linux.cc ('k') | content/common/sandbox_linux/sandbox_bpf_base_policy_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698