| Index: components/nacl/loader/sandbox_linux/nacl_bpf_sandbox_linux.cc
|
| diff --git a/components/nacl/loader/sandbox_linux/nacl_bpf_sandbox_linux.cc b/components/nacl/loader/sandbox_linux/nacl_bpf_sandbox_linux.cc
|
| index 3be2e83556acb30aa7d118e4d73ccec942e6bba1..9a8d96f67fa89169369a88138722e9a13e09c8f4 100644
|
| --- a/components/nacl/loader/sandbox_linux/nacl_bpf_sandbox_linux.cc
|
| +++ b/components/nacl/loader/sandbox_linux/nacl_bpf_sandbox_linux.cc
|
| @@ -9,8 +9,9 @@
|
|
|
| #include "base/macros.h"
|
| #include "build/build_config.h"
|
| +#include "sandbox/sandbox_features.h"
|
|
|
| -#if defined(USE_SECCOMP_BPF)
|
| +#if BUILDFLAG(USE_SECCOMP_BPF)
|
|
|
| #include <errno.h>
|
| #include <signal.h>
|
| @@ -30,11 +31,11 @@
|
| #include "sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h"
|
| #include "sandbox/linux/system_headers/linux_syscalls.h"
|
|
|
| -#endif // defined(USE_SECCOMP_BPF)
|
| +#endif // BUILDFLAG(USE_SECCOMP_BPF)
|
|
|
| namespace nacl {
|
|
|
| -#if defined(USE_SECCOMP_BPF)
|
| +#if BUILDFLAG(USE_SECCOMP_BPF)
|
|
|
| namespace {
|
|
|
| @@ -163,10 +164,10 @@ void RunSandboxSanityChecks() {
|
|
|
| #error "Seccomp-bpf disabled on supported architecture!"
|
|
|
| -#endif // defined(USE_SECCOMP_BPF)
|
| +#endif // BUILDFLAG(USE_SECCOMP_BPF)
|
|
|
| bool InitializeBPFSandbox(base::ScopedFD proc_fd) {
|
| -#if defined(USE_SECCOMP_BPF)
|
| +#if BUILDFLAG(USE_SECCOMP_BPF)
|
| bool sandbox_is_initialized = content::InitializeSandbox(
|
| std::unique_ptr<sandbox::bpf_dsl::Policy>(new NaClBPFSandboxPolicy),
|
| std::move(proc_fd));
|
| @@ -174,7 +175,7 @@ bool InitializeBPFSandbox(base::ScopedFD proc_fd) {
|
| RunSandboxSanityChecks();
|
| return true;
|
| }
|
| -#endif // defined(USE_SECCOMP_BPF)
|
| +#endif // BUILDFLAG(USE_SECCOMP_BPF)
|
| return false;
|
| }
|
|
|
|
|