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

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: Rewrap comment. 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 65fc946e36628a802bc8823c3ab62a43ba9e320d..722f4014726b73187f7098aa51ee803e6b157386 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"
@@ -161,10 +162,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