| 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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 // app quits. Each "main" needs to flush this pool right before it goes into | 274 // app quits. Each "main" needs to flush this pool right before it goes into |
| 275 // its main event loop to get rid of the cruft. | 275 // its main event loop to get rid of the cruft. |
| 276 base::ScopedNSAutoreleasePool autorelease_pool; | 276 base::ScopedNSAutoreleasePool autorelease_pool; |
| 277 | 277 |
| 278 // Initialize the command line. | 278 // Initialize the command line. |
| 279 #if defined(OS_WIN) | 279 #if defined(OS_WIN) |
| 280 CommandLine::Init(0, NULL); | 280 CommandLine::Init(0, NULL); |
| 281 #else | 281 #else |
| 282 CommandLine::Init(argc, argv); | 282 CommandLine::Init(argc, argv); |
| 283 #endif | 283 #endif |
| 284 |
| 285 #if defined(OS_MACOSX) |
| 286 // Needs to be called after CommandLine::Init(). |
| 287 InitCrashProcessInfo(); |
| 288 #endif |
| 289 |
| 284 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); | 290 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); |
| 285 | 291 |
| 286 #if defined(OS_WIN) | 292 #if defined(OS_WIN) |
| 287 // Must do this before any other usage of command line! | 293 // Must do this before any other usage of command line! |
| 288 if (HasDeprecatedArguments(parsed_command_line.command_line_string())) | 294 if (HasDeprecatedArguments(parsed_command_line.command_line_string())) |
| 289 return 1; | 295 return 1; |
| 290 #endif | 296 #endif |
| 291 | 297 |
| 292 int browser_pid; | 298 int browser_pid; |
| 293 std::wstring process_type = | 299 std::wstring process_type = |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 _CrtDumpMemoryLeaks(); | 460 _CrtDumpMemoryLeaks(); |
| 455 #endif // _CRTDBG_MAP_ALLOC | 461 #endif // _CRTDBG_MAP_ALLOC |
| 456 | 462 |
| 457 _Module.Term(); | 463 _Module.Term(); |
| 458 #endif | 464 #endif |
| 459 | 465 |
| 460 logging::CleanupChromeLogging(); | 466 logging::CleanupChromeLogging(); |
| 461 | 467 |
| 462 return rv; | 468 return rv; |
| 463 } | 469 } |
| OLD | NEW |