summaryrefslogtreecommitdiffstats
path: root/chrome/app
diff options
context:
space:
mode:
authorbradchen@google.com <bradchen@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-20 15:14:19 +0000
committerbradchen@google.com <bradchen@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-20 15:14:19 +0000
commit9f40ea766dcc71ec0af6bca149f6e8966e674426 (patch)
tree9b5674bcdb9672fff01044c6e10d689fa70c499a /chrome/app
parentc0a2128d9ebe63fd576ee9a34f137235240596ca (diff)
downloadchromium_src-9f40ea766dcc71ec0af6bca149f6e8966e674426.zip
chromium_src-9f40ea766dcc71ec0af6bca149f6e8966e674426.tar.gz
chromium_src-9f40ea766dcc71ec0af6bca149f6e8966e674426.tar.bz2
A ZygoteForkDelegate using nacl_helper executable to create container processes for NaCl modules.
BUG=nativeclient:480 TEST=NaCl tests in Chrome Review URL: http://codereview.chromium.org/7442001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93195 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app')
-rw-r--r--chrome/app/chrome_main.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/chrome/app/chrome_main.cc b/chrome/app/chrome_main.cc
index dff8ad0..b85b6d6 100644
--- a/chrome/app/chrome_main.cc
+++ b/chrome/app/chrome_main.cc
@@ -77,6 +77,7 @@
#endif
#if defined(OS_POSIX) && !defined(OS_MACOSX)
+#include "chrome/common/nacl_fork_delegate_linux.h"
#include "content/common/zygote_fork_delegate_linux.h"
#endif
@@ -459,8 +460,17 @@ int RunZygote(const MainFunctionParams& main_function_params) {
media::InitializeMediaLibrary(media_path);
// This function call can return multiple times, once per fork().
+#if defined(DISABLE_NACL)
if (!ZygoteMain(main_function_params, NULL))
return 1;
+#else
+ NaClForkDelegate* nacl_delegate = new NaClForkDelegate();
+ int rval = ZygoteMain(main_function_params, nacl_delegate);
+ if (nacl_delegate)
+ delete nacl_delegate;
+ if (!rval)
+ return 1;
+#endif
// Zygote::HandleForkRequest may have reallocated the command
// line so update it here with the new version.