OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_COMMON_SANDBOX_SECCOMP_BPF_LINUX_H_ |
| 6 #define CONTENT_COMMON_SANDBOX_SECCOMP_BPF_LINUX_H_ |
| 7 |
| 8 #include "base/basictypes.h" |
| 9 |
| 10 namespace content { |
| 11 |
| 12 class SandboxSeccompBpf { |
| 13 public: |
| 14 // Is the sandbox globally enabled, can anything use it at all ? |
| 15 static bool IsSeccompBpfDesired(); |
| 16 // Should the sandbox be enabled for process_type ? |
| 17 static bool ShouldEnableSeccompBpf(const std::string& process_type); |
| 18 // Check if the kernel supports this sandbox. It's useful to "prewarm" |
| 19 // this, part of the result will be cached. |
| 20 static bool SupportsSandbox(); |
| 21 // Start the sandbox and apply the policy for process_type. |
| 22 static bool StartSandbox(const std::string& process_type); |
| 23 |
| 24 private: |
| 25 DISALLOW_IMPLICIT_CONSTRUCTORS(SandboxSeccompBpf); |
| 26 }; |
| 27 |
| 28 } // namespace content |
| 29 |
| 30 #endif // CONTENT_COMMON_SANDBOX_SECCOMP_BPF_LINUX_H_ |
| 31 |
OLD | NEW |