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

Unified Diff: chrome/app/chrome_dll_main.cc

Issue 115773: Prototype implementation of zygotes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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 | « chrome/app/breakpad_linux.cc ('k') | chrome/browser/renderer_host/browser_render_process_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/chrome_dll_main.cc
===================================================================
--- chrome/app/chrome_dll_main.cc (revision 17632)
+++ chrome/app/chrome_dll_main.cc (working copy)
@@ -45,6 +45,9 @@
#if defined(OS_WIN)
#include "base/win_util.h"
#endif
+#if defined(OS_LINUX)
+#include "base/zygote_manager.h"
+#endif
#if defined(OS_MACOSX)
#include "chrome/app/breakpad_mac.h"
#elif defined(OS_LINUX)
@@ -292,6 +295,18 @@
// Initialize the command line.
#if defined(OS_WIN)
CommandLine::Init(0, NULL);
+#elif defined(OS_LINUX)
+ base::ZygoteManager* zm = base::ZygoteManager::Get();
+ std::vector<std::string>* zargv = NULL;
+ if (zm)
+ zargv = zm->Start();
+ if (zargv) {
+ // Forked child.
+ CommandLine::Init(*zargv);
+ } else {
+ // Original process.
+ CommandLine::Init(argc, argv);
+ }
#else
CommandLine::Init(argc, argv);
#endif
« no previous file with comments | « chrome/app/breakpad_linux.cc ('k') | chrome/browser/renderer_host/browser_render_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698