| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 // TODO(port): the ifdefs in here are a first step towards trying to determine | 5 // TODO(port): the ifdefs in here are a first step towards trying to determine |
| 6 // the correct abstraction for all the OS functionality required at this | 6 // the correct abstraction for all the OS functionality required at this |
| 7 // stage of process initialization. It should not be taken as a final | 7 // stage of process initialization. It should not be taken as a final |
| 8 // abstraction. | 8 // abstraction. |
| 9 | 9 |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 | 471 |
| 472 // TODO(port): turn on these main() functions as they've been de-winified. | 472 // TODO(port): turn on these main() functions as they've been de-winified. |
| 473 int rv = -1; | 473 int rv = -1; |
| 474 if (process_type == switches::kRendererProcess) { | 474 if (process_type == switches::kRendererProcess) { |
| 475 rv = RendererMain(main_params); | 475 rv = RendererMain(main_params); |
| 476 } else if (process_type == switches::kPluginProcess) { | 476 } else if (process_type == switches::kPluginProcess) { |
| 477 rv = PluginMain(main_params); | 477 rv = PluginMain(main_params); |
| 478 } else if (process_type == switches::kUtilityProcess) { | 478 } else if (process_type == switches::kUtilityProcess) { |
| 479 rv = UtilityMain(main_params); | 479 rv = UtilityMain(main_params); |
| 480 } else if (process_type == switches::kWorkerProcess) { | 480 } else if (process_type == switches::kWorkerProcess) { |
| 481 #if defined(OS_WIN) | |
| 482 rv = WorkerMain(main_params); | 481 rv = WorkerMain(main_params); |
| 483 #else | |
| 484 NOTIMPLEMENTED(); | |
| 485 #endif | |
| 486 } else if (process_type == switches::kZygoteProcess) { | 482 } else if (process_type == switches::kZygoteProcess) { |
| 487 #if defined(OS_LINUX) | 483 #if defined(OS_LINUX) |
| 488 if (ZygoteMain(main_params)) { | 484 if (ZygoteMain(main_params)) { |
| 489 // Zygote::HandleForkRequest may have reallocated the command | 485 // Zygote::HandleForkRequest may have reallocated the command |
| 490 // line so update it here with the new version. | 486 // line so update it here with the new version. |
| 491 const CommandLine& parsed_command_line = | 487 const CommandLine& parsed_command_line = |
| 492 *CommandLine::ForCurrentProcess(); | 488 *CommandLine::ForCurrentProcess(); |
| 493 MainFunctionParams main_params(parsed_command_line, sandbox_wrapper, | 489 MainFunctionParams main_params(parsed_command_line, sandbox_wrapper, |
| 494 &autorelease_pool); | 490 &autorelease_pool); |
| 495 RendererMain(main_params); | 491 RendererMain(main_params); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 525 _CrtDumpMemoryLeaks(); | 521 _CrtDumpMemoryLeaks(); |
| 526 #endif // _CRTDBG_MAP_ALLOC | 522 #endif // _CRTDBG_MAP_ALLOC |
| 527 | 523 |
| 528 _Module.Term(); | 524 _Module.Term(); |
| 529 #endif | 525 #endif |
| 530 | 526 |
| 531 logging::CleanupChromeLogging(); | 527 logging::CleanupChromeLogging(); |
| 532 | 528 |
| 533 return rv; | 529 return rv; |
| 534 } | 530 } |
| OLD | NEW |