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

Unified Diff: content/utility/utility_main.cc

Issue 10920057: Linux: initialize the sandbox in the utility process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months 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 | « content/common/sandbox_seccomp_bpf_linux.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/utility/utility_main.cc
diff --git a/content/utility/utility_main.cc b/content/utility/utility_main.cc
index 711b7bce81242e48c59c0f2d7d84dd849c732a47..6aeff1daf74581d31ccfaeacac84db8c1a28340f 100644
--- a/content/utility/utility_main.cc
+++ b/content/utility/utility_main.cc
@@ -10,6 +10,7 @@
#include "content/common/child_process.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/main_function_params.h"
+#include "content/public/common/sandbox_init.h"
#include "content/utility/utility_thread_impl.h"
#if defined(OS_WIN)
@@ -25,6 +26,11 @@ int UtilityMain(const content::MainFunctionParams& parameters) {
base::SystemMonitor system_monitor;
HighResolutionTimerManager hi_res_timer_manager;
+#if defined(OS_LINUX)
+ // Initialize the sandbox before any thread is created.
+ content::InitializeSandbox();
+#endif
+
ChildProcess utility_process;
utility_process.set_main_thread(new UtilityThreadImpl());
« no previous file with comments | « content/common/sandbox_seccomp_bpf_linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698