summaryrefslogtreecommitdiffstats
path: root/chrome/app
diff options
context:
space:
mode:
authormdempsky@chromium.org <mdempsky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-11 01:17:47 +0000
committermdempsky@chromium.org <mdempsky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-11 01:17:47 +0000
commit54ad01a07a6c2ffa6ee2d2ec11cd6d56b723cd5e (patch)
treeee8f209267515175b3c9c11a52c1fce9a699c675 /chrome/app
parent5cf28ab789a0fa2faf5050b8a60e296f25e808c6 (diff)
downloadchromium_src-54ad01a07a6c2ffa6ee2d2ec11cd6d56b723cd5e.zip
chromium_src-54ad01a07a6c2ffa6ee2d2ec11cd6d56b723cd5e.tar.gz
chromium_src-54ad01a07a6c2ffa6ee2d2ec11cd6d56b723cd5e.tar.bz2
Add support for multiple zygote fork delegates
No functional changes yet, just preparation for splitting NaCl's fork delegate into two different implementations. BUG=364945 Review URL: https://codereview.chromium.org/269413004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269673 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app')
-rw-r--r--chrome/app/chrome_main_delegate.cc9
-rw-r--r--chrome/app/chrome_main_delegate.h6
2 files changed, 9 insertions, 6 deletions
diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc
index 2c29876..486cd42 100644
--- a/chrome/app/chrome_main_delegate.cc
+++ b/chrome/app/chrome_main_delegate.cc
@@ -855,11 +855,10 @@ bool ChromeMainDelegate::DelaySandboxInitialization(
process_type == switches::kRelauncherProcess;
}
#elif defined(OS_POSIX) && !defined(OS_ANDROID)
-content::ZygoteForkDelegate* ChromeMainDelegate::ZygoteStarting() {
-#if defined(DISABLE_NACL)
- return NULL;
-#else
- return new NaClForkDelegate();
+void ChromeMainDelegate::ZygoteStarting(
+ ScopedVector<content::ZygoteForkDelegate>* delegates) {
+#if !defined(DISABLE_NACL)
+ delegates->push_back(new NaClForkDelegate());
#endif
}
diff --git a/chrome/app/chrome_main_delegate.h b/chrome/app/chrome_main_delegate.h
index 5b651fe..d0707ed 100644
--- a/chrome/app/chrome_main_delegate.h
+++ b/chrome/app/chrome_main_delegate.h
@@ -10,6 +10,9 @@
#include "chrome/common/chrome_content_client.h"
#include "content/public/app/content_main_delegate.h"
+template <typename>
+class ScopedVector;
+
namespace base {
class CommandLine;
}
@@ -36,7 +39,8 @@ class ChromeMainDelegate : public content::ContentMainDelegate {
virtual bool DelaySandboxInitialization(
const std::string& process_type) OVERRIDE;
#elif defined(OS_POSIX) && !defined(OS_ANDROID)
- virtual content::ZygoteForkDelegate* ZygoteStarting() OVERRIDE;
+ virtual void ZygoteStarting(
+ ScopedVector<content::ZygoteForkDelegate>* delegates) OVERRIDE;
virtual void ZygoteForked() OVERRIDE;
#endif
virtual content::ContentBrowserClient* CreateContentBrowserClient() OVERRIDE;