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

Side by Side Diff: content/app/content_main.cc

Issue 8817013: Revert 113027 - Zygote most of the uses of the utility process on Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/app/content_main.h" 5 #include "content/app/content_main.h"
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/debugger.h" 9 #include "base/debug/debugger.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 // On platforms that use the zygote, we have a special subset of 185 // On platforms that use the zygote, we have a special subset of
186 // subprocesses that are launched via the zygote. This function 186 // subprocesses that are launched via the zygote. This function
187 // fills in some process-launching bits around ZygoteMain(). 187 // fills in some process-launching bits around ZygoteMain().
188 // Returns the exit code of the subprocess. 188 // Returns the exit code of the subprocess.
189 int RunZygote(const content::MainFunctionParams& main_function_params, 189 int RunZygote(const content::MainFunctionParams& main_function_params,
190 content::ContentMainDelegate* delegate) { 190 content::ContentMainDelegate* delegate) {
191 static const MainFunction kMainFunctions[] = { 191 static const MainFunction kMainFunctions[] = {
192 { switches::kRendererProcess, RendererMain }, 192 { switches::kRendererProcess, RendererMain },
193 { switches::kWorkerProcess, WorkerMain }, 193 { switches::kWorkerProcess, WorkerMain },
194 { switches::kPpapiPluginProcess, PpapiPluginMain }, 194 { switches::kPpapiPluginProcess, PpapiPluginMain },
195 { switches::kUtilityProcess, UtilityMain },
196 }; 195 };
197 196
198 scoped_ptr<content::ZygoteForkDelegate> zygote_fork_delegate; 197 scoped_ptr<content::ZygoteForkDelegate> zygote_fork_delegate;
199 if (delegate) zygote_fork_delegate.reset(delegate->ZygoteStarting()); 198 if (delegate) zygote_fork_delegate.reset(delegate->ZygoteStarting());
200 199
201 // This function call can return multiple times, once per fork(). 200 // This function call can return multiple times, once per fork().
202 if (!ZygoteMain(main_function_params, zygote_fork_delegate.get())) 201 if (!ZygoteMain(main_function_params, zygote_fork_delegate.get()))
203 return 1; 202 return 1;
204 203
205 if (delegate) delegate->ZygoteForked(); 204 if (delegate) delegate->ZygoteForked();
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 _CrtDumpMemoryLeaks(); 460 _CrtDumpMemoryLeaks();
462 #endif // _CRTDBG_MAP_ALLOC 461 #endif // _CRTDBG_MAP_ALLOC
463 462
464 _Module.Term(); 463 _Module.Term();
465 #endif // OS_WIN 464 #endif // OS_WIN
466 465
467 return exit_code; 466 return exit_code;
468 } 467 }
469 468
470 } // namespace content 469 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/importer/external_process_importer_client.cc ('k') | content/browser/plugin_loader_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698