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

Unified Diff: components/nacl/loader/sandbox_linux/nacl_bpf_sandbox_linux.cc

Issue 2523253002: Convert use_seccomp_bpf to the BUILDFLAG system. (Closed)
Patch Set: Rebase Created 4 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
« no previous file with comments | « components/nacl/loader/sandbox_linux/BUILD.gn ('k') | content/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « components/nacl/loader/sandbox_linux/BUILD.gn ('k') | content/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698