OLD | NEW |
---|---|
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "app/app_paths.h" | 5 #include "app/app_paths.h" |
6 #include "app/app_switches.h" | 6 #include "app/app_switches.h" |
7 #include "app/resource_bundle.h" | 7 #include "app/resource_bundle.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" | |
16 #include "base/path_service.h" | 17 #include "base/path_service.h" |
17 #include "base/process_util.h" | 18 #include "base/process_util.h" |
18 #include "base/string_number_conversions.h" | 19 #include "base/string_number_conversions.h" |
19 #include "base/string_util.h" | 20 #include "base/string_util.h" |
20 #include "base/utf_string_conversions.h" | 21 #include "base/utf_string_conversions.h" |
21 #include "build/build_config.h" | 22 #include "build/build_config.h" |
22 #include "chrome/browser/defaults.h" | 23 #include "chrome/browser/defaults.h" |
23 #include "chrome/browser/diagnostics/diagnostics_main.h" | 24 #include "chrome/browser/diagnostics/diagnostics_main.h" |
24 #include "chrome/browser/platform_util.h" | 25 #include "chrome/browser/platform_util.h" |
25 #include "chrome/browser/renderer_host/render_process_host.h" | 26 #include "chrome/browser/renderer_host/render_process_host.h" |
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
707 if (!base::debug::BeingDebugged()) | 708 if (!base::debug::BeingDebugged()) |
708 signal(SIGINT, SIG_IGN); | 709 signal(SIGINT, SIG_IGN); |
709 #endif | 710 #endif |
710 } | 711 } |
711 SetupCRT(command_line); | 712 SetupCRT(command_line); |
712 | 713 |
713 // Initialize the Chrome path provider. | 714 // Initialize the Chrome path provider. |
714 app::RegisterPathProvider(); | 715 app::RegisterPathProvider(); |
715 chrome::RegisterPathProvider(); | 716 chrome::RegisterPathProvider(); |
716 | 717 |
718 base::EarlyNSSInit(); | |
wtc
2011/01/13 00:07:02
Nit: since EarlyNSSInit doesn't use the Chrome pat
| |
719 | |
717 // Notice a user data directory override if any | 720 // Notice a user data directory override if any |
718 const FilePath user_data_dir = | 721 const FilePath user_data_dir = |
719 command_line.GetSwitchValuePath(switches::kUserDataDir); | 722 command_line.GetSwitchValuePath(switches::kUserDataDir); |
720 if (!user_data_dir.empty()) | 723 if (!user_data_dir.empty()) |
721 CHECK(PathService::Override(chrome::DIR_USER_DATA, user_data_dir)); | 724 CHECK(PathService::Override(chrome::DIR_USER_DATA, user_data_dir)); |
722 | 725 |
723 #if defined(OS_MACOSX) | 726 #if defined(OS_MACOSX) |
724 // TODO(mark): Right now, InitCrashReporter() needs to be called after | 727 // TODO(mark): Right now, InitCrashReporter() needs to be called after |
725 // CommandLine::Init() and chrome::RegisterPathProvider(). Ideally, Breakpad | 728 // CommandLine::Init() and chrome::RegisterPathProvider(). Ideally, Breakpad |
726 // initialization could occur sooner, preferably even before the framework | 729 // initialization could occur sooner, preferably even before the framework |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
913 | 916 |
914 int exit_code = RunNamedProcessTypeMain(process_type, main_params); | 917 int exit_code = RunNamedProcessTypeMain(process_type, main_params); |
915 | 918 |
916 if (SubprocessNeedsResourceBundle(process_type)) | 919 if (SubprocessNeedsResourceBundle(process_type)) |
917 ResourceBundle::CleanupSharedInstance(); | 920 ResourceBundle::CleanupSharedInstance(); |
918 | 921 |
919 LowLevelShutdown(); | 922 LowLevelShutdown(); |
920 | 923 |
921 return exit_code; | 924 return exit_code; |
922 } | 925 } |
OLD | NEW |