| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 #include "base/process_util.h" | 43 #include "base/process_util.h" |
| 44 #include "base/scoped_nsautorelease_pool.h" | 44 #include "base/scoped_nsautorelease_pool.h" |
| 45 #include "base/stats_counters.h" | 45 #include "base/stats_counters.h" |
| 46 #include "base/stats_table.h" | 46 #include "base/stats_table.h" |
| 47 #include "base/string_util.h" | 47 #include "base/string_util.h" |
| 48 #if defined(OS_WIN) | 48 #if defined(OS_WIN) |
| 49 #include "base/win_util.h" | 49 #include "base/win_util.h" |
| 50 #endif | 50 #endif |
| 51 #if defined(OS_MACOSX) | 51 #if defined(OS_MACOSX) |
| 52 #include "chrome/app/breakpad_mac.h" | 52 #include "chrome/app/breakpad_mac.h" |
| 53 #elif defined(OS_LINUX) | |
| 54 #include "chrome/app/breakpad_linux.h" | |
| 55 #endif | 53 #endif |
| 56 #include "chrome/app/scoped_ole_initializer.h" | 54 #include "chrome/app/scoped_ole_initializer.h" |
| 57 #include "chrome/browser/renderer_host/render_process_host.h" | 55 #include "chrome/browser/renderer_host/render_process_host.h" |
| 58 #include "chrome/common/chrome_constants.h" | 56 #include "chrome/common/chrome_constants.h" |
| 59 #include "chrome/common/chrome_counters.h" | 57 #include "chrome/common/chrome_counters.h" |
| 60 #include "chrome/common/chrome_descriptors.h" | 58 #include "chrome/common/chrome_descriptors.h" |
| 61 #include "chrome/common/chrome_paths.h" | 59 #include "chrome/common/chrome_paths.h" |
| 62 #include "chrome/common/chrome_switches.h" | 60 #include "chrome/common/chrome_switches.h" |
| 63 #include "chrome/common/logging_chrome.h" | 61 #include "chrome/common/logging_chrome.h" |
| 64 #include "chrome/common/main_function_params.h" | 62 #include "chrome/common/main_function_params.h" |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 #if defined(OS_WIN) | 411 #if defined(OS_WIN) |
| 414 _Module.Init(NULL, instance); | 412 _Module.Init(NULL, instance); |
| 415 #endif | 413 #endif |
| 416 | 414 |
| 417 // Notice a user data directory override if any | 415 // Notice a user data directory override if any |
| 418 const std::wstring user_data_dir = | 416 const std::wstring user_data_dir = |
| 419 parsed_command_line.GetSwitchValue(switches::kUserDataDir); | 417 parsed_command_line.GetSwitchValue(switches::kUserDataDir); |
| 420 if (!user_data_dir.empty()) | 418 if (!user_data_dir.empty()) |
| 421 CHECK(PathService::Override(chrome::DIR_USER_DATA, user_data_dir)); | 419 CHECK(PathService::Override(chrome::DIR_USER_DATA, user_data_dir)); |
| 422 | 420 |
| 423 #if defined(OS_LINUX) | |
| 424 // Needs to be called after we have chrome::DIR_USER_DATA. | |
| 425 InitCrashReporter(); | |
| 426 #endif | |
| 427 | |
| 428 bool single_process = | 421 bool single_process = |
| 429 #if defined (GOOGLE_CHROME_BUILD) | 422 #if defined (GOOGLE_CHROME_BUILD) |
| 430 // This is an unsupported and not fully tested mode, so don't enable it for | 423 // This is an unsupported and not fully tested mode, so don't enable it for |
| 431 // official Chrome builds. | 424 // official Chrome builds. |
| 432 false; | 425 false; |
| 433 #else | 426 #else |
| 434 parsed_command_line.HasSwitch(switches::kSingleProcess); | 427 parsed_command_line.HasSwitch(switches::kSingleProcess); |
| 435 #endif | 428 #endif |
| 436 if (single_process) | 429 if (single_process) |
| 437 RenderProcessHost::set_run_renderer_in_process(true); | 430 RenderProcessHost::set_run_renderer_in_process(true); |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 528 _CrtDumpMemoryLeaks(); | 521 _CrtDumpMemoryLeaks(); |
| 529 #endif // _CRTDBG_MAP_ALLOC | 522 #endif // _CRTDBG_MAP_ALLOC |
| 530 | 523 |
| 531 _Module.Term(); | 524 _Module.Term(); |
| 532 #endif | 525 #endif |
| 533 | 526 |
| 534 logging::CleanupChromeLogging(); | 527 logging::CleanupChromeLogging(); |
| 535 | 528 |
| 536 return rv; | 529 return rv; |
| 537 } | 530 } |
| OLD | NEW |