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

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

Issue 733303004: Linux sandbox: change API to start the sandbox (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 1 month 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: 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 b1f6704338d1ad7cb5c17ff59580010a0e0c863f..bff502f22eb8490ae1944aac882287a977190eb3 100644
--- a/components/nacl/loader/sandbox_linux/nacl_bpf_sandbox_linux.cc
+++ b/components/nacl/loader/sandbox_linux/nacl_bpf_sandbox_linux.cc
@@ -18,6 +18,7 @@
#include "base/callback.h"
#include "base/command_line.h"
#include "base/compiler_specific.h"
+#include "base/files/scoped_file.h"
#include "base/logging.h"
#include "components/nacl/common/nacl_switches.h"
@@ -159,10 +160,11 @@ void RunSandboxSanityChecks() {
#endif // defined(USE_SECCOMP_BPF)
-bool InitializeBPFSandbox() {
+bool InitializeBPFSandbox(base::ScopedFD proc_task_fd) {
#if defined(USE_SECCOMP_BPF)
bool sandbox_is_initialized = content::InitializeSandbox(
- scoped_ptr<sandbox::bpf_dsl::Policy>(new NaClBPFSandboxPolicy));
+ scoped_ptr<sandbox::bpf_dsl::Policy>(new NaClBPFSandboxPolicy),
+ proc_task_fd.Pass());
if (sandbox_is_initialized) {
RunSandboxSanityChecks();
return true;

Powered by Google App Engine
This is Rietveld 408576698