| OLD | NEW |
| 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 "chrome/app/chrome_main.h" | 5 #include "chrome/app/chrome_main.h" |
| 6 | 6 |
| 7 #include "app/app_paths.h" | 7 #include "app/app_paths.h" |
| 8 #include "base/at_exit.h" | 8 #include "base/at_exit.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/debugger.h" | 10 #include "base/debug/debugger.h" |
| 11 #include "base/i18n/icu_util.h" | 11 #include "base/i18n/icu_util.h" |
| 12 #include "base/mac/scoped_nsautorelease_pool.h" | 12 #include "base/mac/scoped_nsautorelease_pool.h" |
| 13 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
| 14 #include "base/metrics/stats_counters.h" | 14 #include "base/metrics/stats_counters.h" |
| 15 #include "base/metrics/stats_table.h" | 15 #include "base/metrics/stats_table.h" |
| 16 #include "base/nss_util.h" | |
| 17 #include "base/path_service.h" | 16 #include "base/path_service.h" |
| 18 #include "base/process_util.h" | 17 #include "base/process_util.h" |
| 19 #include "base/string_number_conversions.h" | 18 #include "base/string_number_conversions.h" |
| 20 #include "base/string_util.h" | 19 #include "base/string_util.h" |
| 21 #include "base/utf_string_conversions.h" | 20 #include "base/utf_string_conversions.h" |
| 22 #include "build/build_config.h" | 21 #include "build/build_config.h" |
| 22 #include "crypto/nss_util.h" |
| 23 #include "chrome/browser/defaults.h" | 23 #include "chrome/browser/defaults.h" |
| 24 #include "chrome/browser/diagnostics/diagnostics_main.h" | 24 #include "chrome/browser/diagnostics/diagnostics_main.h" |
| 25 #include "chrome/browser/platform_util.h" | 25 #include "chrome/browser/platform_util.h" |
| 26 #include "chrome/common/chrome_constants.h" | 26 #include "chrome/common/chrome_constants.h" |
| 27 #include "chrome/common/chrome_content_client.h" | 27 #include "chrome/common/chrome_content_client.h" |
| 28 #include "chrome/common/chrome_content_gpu_client.h" | 28 #include "chrome/common/chrome_content_gpu_client.h" |
| 29 #include "chrome/common/chrome_content_plugin_client.h" | 29 #include "chrome/common/chrome_content_plugin_client.h" |
| 30 #include "chrome/common/chrome_counters.h" | 30 #include "chrome/common/chrome_counters.h" |
| 31 #include "chrome/common/chrome_paths.h" | 31 #include "chrome/common/chrome_paths.h" |
| 32 #include "chrome/common/chrome_paths_internal.h" | 32 #include "chrome/common/chrome_paths_internal.h" |
| (...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 581 // Note that we *can't* rely on BeingDebugged to catch this case because we | 581 // Note that we *can't* rely on BeingDebugged to catch this case because we |
| 582 // are the child process, which is not being debugged. | 582 // are the child process, which is not being debugged. |
| 583 // TODO(evanm): move this to some shared subprocess-init function. | 583 // TODO(evanm): move this to some shared subprocess-init function. |
| 584 if (!base::debug::BeingDebugged()) | 584 if (!base::debug::BeingDebugged()) |
| 585 signal(SIGINT, SIG_IGN); | 585 signal(SIGINT, SIG_IGN); |
| 586 #endif | 586 #endif |
| 587 } | 587 } |
| 588 SetupCRT(command_line); | 588 SetupCRT(command_line); |
| 589 | 589 |
| 590 #if defined(USE_NSS) | 590 #if defined(USE_NSS) |
| 591 base::EarlySetupForNSSInit(); | 591 crypto::EarlySetupForNSSInit(); |
| 592 #endif | 592 #endif |
| 593 | 593 |
| 594 // Initialize the Chrome path provider. | 594 // Initialize the Chrome path provider. |
| 595 app::RegisterPathProvider(); | 595 app::RegisterPathProvider(); |
| 596 ui::RegisterPathProvider(); | 596 ui::RegisterPathProvider(); |
| 597 chrome::RegisterPathProvider(); | 597 chrome::RegisterPathProvider(); |
| 598 content::RegisterPathProvider(); | 598 content::RegisterPathProvider(); |
| 599 | 599 |
| 600 #if defined(OS_MACOSX) | 600 #if defined(OS_MACOSX) |
| 601 // On the Mac, the child executable lives at a predefined location within | 601 // On the Mac, the child executable lives at a predefined location within |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 804 | 804 |
| 805 if (SubprocessNeedsResourceBundle(process_type)) | 805 if (SubprocessNeedsResourceBundle(process_type)) |
| 806 ResourceBundle::CleanupSharedInstance(); | 806 ResourceBundle::CleanupSharedInstance(); |
| 807 | 807 |
| 808 logging::CleanupChromeLogging(); | 808 logging::CleanupChromeLogging(); |
| 809 | 809 |
| 810 chrome_main::LowLevelShutdown(); | 810 chrome_main::LowLevelShutdown(); |
| 811 | 811 |
| 812 return exit_code; | 812 return exit_code; |
| 813 } | 813 } |
| OLD | NEW |