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" |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 // separator isn't a period. See e.g. bugs 22782 and 39964. For | 267 // separator isn't a period. See e.g. bugs 22782 and 39964. For |
268 // all processes except the browser process (where we call system | 268 // all processes except the browser process (where we call system |
269 // APIs that may rely on the correct locale for formatting numbers | 269 // APIs that may rely on the correct locale for formatting numbers |
270 // when presenting them to the user), reset the locale for numeric | 270 // when presenting them to the user), reset the locale for numeric |
271 // formatting. | 271 // formatting. |
272 // Note that this is not correct for plugin processes -- they can | 272 // Note that this is not correct for plugin processes -- they can |
273 // surface UI -- but it's likely they get this wrong too so why not. | 273 // surface UI -- but it's likely they get this wrong too so why not. |
274 setlocale(LC_NUMERIC, "C"); | 274 setlocale(LC_NUMERIC, "C"); |
275 #endif | 275 #endif |
276 | 276 |
| 277 #if defined(USE_LINUX_BREAKPAD) |
| 278 // Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain sets |
| 279 // this up for the browser process in a different manner. Zygotes need to call |
| 280 // InitCrashReporter() in RunZygote(). |
| 281 if (process_type != switches::kZygoteProcess) |
| 282 InitCrashReporter(); |
| 283 #endif |
| 284 |
277 InitializeChromeContentClient(process_type); | 285 InitializeChromeContentClient(process_type); |
278 } | 286 } |
279 | 287 |
280 // Returns true if this subprocess type needs the ResourceBundle initialized | 288 // Returns true if this subprocess type needs the ResourceBundle initialized |
281 // and resources loaded. | 289 // and resources loaded. |
282 bool SubprocessNeedsResourceBundle(const std::string& process_type) { | 290 bool SubprocessNeedsResourceBundle(const std::string& process_type) { |
283 return | 291 return |
284 #if defined(OS_WIN) || defined(OS_MACOSX) | 292 #if defined(OS_WIN) || defined(OS_MACOSX) |
285 // Windows needs resources for the default/null plugin. | 293 // Windows needs resources for the default/null plugin. |
286 // Mac needs them for the plugin process name. | 294 // Mac needs them for the plugin process name. |
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
839 | 847 |
840 if (SubprocessNeedsResourceBundle(process_type)) | 848 if (SubprocessNeedsResourceBundle(process_type)) |
841 ResourceBundle::CleanupSharedInstance(); | 849 ResourceBundle::CleanupSharedInstance(); |
842 | 850 |
843 logging::CleanupChromeLogging(); | 851 logging::CleanupChromeLogging(); |
844 | 852 |
845 chrome_main::LowLevelShutdown(); | 853 chrome_main::LowLevelShutdown(); |
846 | 854 |
847 return exit_code; | 855 return exit_code; |
848 } | 856 } |
OLD | NEW |