Index: content/browser/browser_main_loop.cc |
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc |
index 3c39e531a9aea3f03cfb018a0ee5430a5b2bf243..45254d298e861c1df8a5e5ffefa54ee9ed7698a1 100644 |
--- a/content/browser/browser_main_loop.cc |
+++ b/content/browser/browser_main_loop.cc |
@@ -192,7 +192,7 @@ |
namespace content { |
namespace { |
-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) |
+#if defined(OS_CHROMEOS) |
void SetupSandbox(const base::CommandLine& parsed_command_line) { |
TRACE_EVENT0("startup", "SetupSandbox"); |
base::FilePath sandbox_binary; |
@@ -228,6 +228,16 @@ void SetupSandbox(const base::CommandLine& parsed_command_line) { |
} |
#endif |
+ |
+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_CHROMEOS) |
+void SetupSandbox() { |
mdempsky
2016/04/01 23:25:42
I don't understand why you're duplicating all of t
|
+ base::FilePath sandbox_binary; |
+ RenderSandboxHostLinux::GetInstance()->Init(); |
+ ZygoteHostImpl::GetInstance()->Init(sandbox_binary.value()); |
+ *GetGenericZygote() = CreateZygote(); |
+ RenderProcessHostImpl::EarlyZygoteLaunch(); |
+} |
+#endif |
#if defined(USE_GLIB) |
static void GLibLogHandler(const gchar* log_domain, |
GLogLevelFlags log_level, |
@@ -440,11 +450,8 @@ void BrowserMainLoop::EarlyInitialization() { |
TRACK_SCOPED_REGION("Startup", "BrowserMainLoop::EarlyInitialization"); |
#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) |
- // No thread should be created before this call, as SetupSandbox() |
- // will end-up using fork(). |
- SetupSandbox(parsed_command_line_); |
+ SetupSandbox(); |
mdempsky
2016/04/01 23:25:43
This won't compile on Chrome OS: your SetupSandbox
|
#endif |
- |
#if defined(USE_X11) |
if (UsingInProcessGpu()) { |
if (!gfx::InitializeThreadedX11()) { |