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" | |
8 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
9 #include "base/command_line.h" | 8 #include "base/command_line.h" |
10 #include "base/debug/debugger.h" | 9 #include "base/debug/debugger.h" |
11 #include "base/i18n/icu_util.h" | 10 #include "base/i18n/icu_util.h" |
12 #include "base/mac/scoped_nsautorelease_pool.h" | 11 #include "base/mac/scoped_nsautorelease_pool.h" |
13 #include "base/message_loop.h" | 12 #include "base/message_loop.h" |
14 #include "base/metrics/stats_counters.h" | 13 #include "base/metrics/stats_counters.h" |
15 #include "base/metrics/stats_table.h" | 14 #include "base/metrics/stats_table.h" |
16 #include "base/nss_util.h" | 15 #include "base/nss_util.h" |
17 #include "base/path_service.h" | 16 #include "base/path_service.h" |
(...skipping 11 matching lines...) Expand all Loading... |
29 #include "chrome/common/chrome_descriptors.h" | 28 #include "chrome/common/chrome_descriptors.h" |
30 #include "chrome/common/chrome_paths.h" | 29 #include "chrome/common/chrome_paths.h" |
31 #include "chrome/common/chrome_switches.h" | 30 #include "chrome/common/chrome_switches.h" |
32 #include "chrome/common/chrome_version_info.h" | 31 #include "chrome/common/chrome_version_info.h" |
33 #include "chrome/common/logging_chrome.h" | 32 #include "chrome/common/logging_chrome.h" |
34 #include "chrome/common/main_function_params.h" | 33 #include "chrome/common/main_function_params.h" |
35 #include "chrome/common/sandbox_init_wrapper.h" | 34 #include "chrome/common/sandbox_init_wrapper.h" |
36 #include "chrome/common/set_process_title.h" | 35 #include "chrome/common/set_process_title.h" |
37 #include "chrome/common/url_constants.h" | 36 #include "chrome/common/url_constants.h" |
38 #include "ipc/ipc_switches.h" | 37 #include "ipc/ipc_switches.h" |
| 38 #include "ui/base/resource/resource_bundle.h" |
| 39 #include "ui/base/ui_base_paths.h" |
| 40 #include "ui/base/ui_base_switches.h" |
39 | 41 |
40 #if defined(OS_WIN) | 42 #if defined(OS_WIN) |
41 #include <algorithm> | 43 #include <algorithm> |
42 #include <atlbase.h> | 44 #include <atlbase.h> |
43 #include <atlapp.h> | 45 #include <atlapp.h> |
44 #include <malloc.h> | 46 #include <malloc.h> |
45 #include <new.h> | 47 #include <new.h> |
46 #include "sandbox/src/sandbox.h" | 48 #include "sandbox/src/sandbox.h" |
47 #include "tools/memory_watcher/memory_watcher.h" | 49 #include "tools/memory_watcher/memory_watcher.h" |
48 #endif | 50 #endif |
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
710 #endif | 712 #endif |
711 } | 713 } |
712 SetupCRT(command_line); | 714 SetupCRT(command_line); |
713 | 715 |
714 #if defined(USE_NSS) | 716 #if defined(USE_NSS) |
715 base::EarlySetupForNSSInit(); | 717 base::EarlySetupForNSSInit(); |
716 #endif | 718 #endif |
717 | 719 |
718 // Initialize the Chrome path provider. | 720 // Initialize the Chrome path provider. |
719 app::RegisterPathProvider(); | 721 app::RegisterPathProvider(); |
| 722 ui::RegisterPathProvider(); |
720 chrome::RegisterPathProvider(); | 723 chrome::RegisterPathProvider(); |
721 | 724 |
722 // Notice a user data directory override if any | 725 // Notice a user data directory override if any |
723 const FilePath user_data_dir = | 726 const FilePath user_data_dir = |
724 command_line.GetSwitchValuePath(switches::kUserDataDir); | 727 command_line.GetSwitchValuePath(switches::kUserDataDir); |
725 if (!user_data_dir.empty()) | 728 if (!user_data_dir.empty()) |
726 CHECK(PathService::Override(chrome::DIR_USER_DATA, user_data_dir)); | 729 CHECK(PathService::Override(chrome::DIR_USER_DATA, user_data_dir)); |
727 | 730 |
728 #if defined(OS_MACOSX) | 731 #if defined(OS_MACOSX) |
729 // TODO(mark): Right now, InitCrashReporter() needs to be called after | 732 // TODO(mark): Right now, InitCrashReporter() needs to be called after |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
918 | 921 |
919 int exit_code = RunNamedProcessTypeMain(process_type, main_params); | 922 int exit_code = RunNamedProcessTypeMain(process_type, main_params); |
920 | 923 |
921 if (SubprocessNeedsResourceBundle(process_type)) | 924 if (SubprocessNeedsResourceBundle(process_type)) |
922 ResourceBundle::CleanupSharedInstance(); | 925 ResourceBundle::CleanupSharedInstance(); |
923 | 926 |
924 LowLevelShutdown(); | 927 LowLevelShutdown(); |
925 | 928 |
926 return exit_code; | 929 return exit_code; |
927 } | 930 } |
OLD | NEW |