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

Unified Diff: content/app/content_main_runner.cc

Issue 269413004: Add support for multiple zygote fork delegates (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: IWYU Created 6 years, 7 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/chrome_main_delegate.cc ('k') | content/public/app/content_main_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/app/content_main_runner.cc
diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc
index 2593b28d6e2c73e2dc14d8a50bcb8f4c268d2567..24a528929e5acd2c7bfaa4ade8cca1bc32ebb621 100644
--- a/content/app/content_main_runner.cc
+++ b/content/app/content_main_runner.cc
@@ -16,6 +16,7 @@
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/scoped_vector.h"
#include "base/metrics/stats_table.h"
#include "base/path_service.h"
#include "base/process/launch.h"
@@ -298,9 +299,9 @@ int RunZygote(const MainFunctionParams& main_function_params,
{ switches::kUtilityProcess, UtilityMain },
};
- scoped_ptr<ZygoteForkDelegate> zygote_fork_delegate;
+ ScopedVector<ZygoteForkDelegate> zygote_fork_delegates;
if (delegate) {
- zygote_fork_delegate.reset(delegate->ZygoteStarting());
+ delegate->ZygoteStarting(&zygote_fork_delegates);
// Each Renderer we spawn will re-attempt initialization of the media
// libraries, at which point failure will be detected and handled, so
// we do not need to cope with initialization failures here.
@@ -310,7 +311,7 @@ int RunZygote(const MainFunctionParams& main_function_params,
}
// This function call can return multiple times, once per fork().
- if (!ZygoteMain(main_function_params, zygote_fork_delegate.get()))
+ if (!ZygoteMain(main_function_params, zygote_fork_delegates.Pass()))
return 1;
if (delegate) delegate->ZygoteForked();
« no previous file with comments | « chrome/app/chrome_main_delegate.cc ('k') | content/public/app/content_main_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698