| 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 "base/at_exit.h" | 7 #include "base/at_exit.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/debug/debugger.h" | 9 #include "base/debug/debugger.h" |
| 10 #include "base/i18n/icu_util.h" | 10 #include "base/i18n/icu_util.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 #endif | 58 #endif |
| 59 | 59 |
| 60 #if defined(OS_MACOSX) | 60 #if defined(OS_MACOSX) |
| 61 #include "base/mac/mac_util.h" | 61 #include "base/mac/mac_util.h" |
| 62 #include "base/mac/os_crash_dumps.h" | 62 #include "base/mac/os_crash_dumps.h" |
| 63 #include "base/mach_ipc_mac.h" | 63 #include "base/mach_ipc_mac.h" |
| 64 #include "base/system_monitor/system_monitor.h" | 64 #include "base/system_monitor/system_monitor.h" |
| 65 #include "chrome/app/breakpad_mac.h" | 65 #include "chrome/app/breakpad_mac.h" |
| 66 #include "chrome/browser/mac/relauncher.h" | 66 #include "chrome/browser/mac/relauncher.h" |
| 67 #include "chrome/common/chrome_paths_internal.h" | 67 #include "chrome/common/chrome_paths_internal.h" |
| 68 #include "chrome/common/mac/cfbundle_blocker.h" |
| 68 #include "content/browser/mach_broker_mac.h" | 69 #include "content/browser/mach_broker_mac.h" |
| 69 #include "grit/chromium_strings.h" | 70 #include "grit/chromium_strings.h" |
| 70 #include "third_party/WebKit/Source/WebKit/mac/WebCoreSupport/WebSystemInterface
.h" | 71 #include "third_party/WebKit/Source/WebKit/mac/WebCoreSupport/WebSystemInterface
.h" |
| 71 #include "ui/base/l10n/l10n_util_mac.h" | 72 #include "ui/base/l10n/l10n_util_mac.h" |
| 72 #include "ui/base/l10n/l10n_util.h" | 73 #include "ui/base/l10n/l10n_util.h" |
| 73 #endif | 74 #endif |
| 74 | 75 |
| 75 #if defined(OS_POSIX) | 76 #if defined(OS_POSIX) |
| 76 #include <locale.h> | 77 #include <locale.h> |
| 77 #include <signal.h> | 78 #include <signal.h> |
| (...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 581 // app quits. Each "main" needs to flush this pool right before it goes into | 582 // app quits. Each "main" needs to flush this pool right before it goes into |
| 582 // its main event loop to get rid of the cruft. | 583 // its main event loop to get rid of the cruft. |
| 583 base::mac::ScopedNSAutoreleasePool autorelease_pool; | 584 base::mac::ScopedNSAutoreleasePool autorelease_pool; |
| 584 | 585 |
| 585 #if defined(OS_CHROMEOS) | 586 #if defined(OS_CHROMEOS) |
| 586 chromeos::BootTimesLoader::Get()->SaveChromeMainStats(); | 587 chromeos::BootTimesLoader::Get()->SaveChromeMainStats(); |
| 587 #endif | 588 #endif |
| 588 | 589 |
| 589 #if defined(OS_MACOSX) | 590 #if defined(OS_MACOSX) |
| 590 chrome_main::SetUpBundleOverrides(); | 591 chrome_main::SetUpBundleOverrides(); |
| 592 chrome::common::mac::EnableCFBundleBlocker(); |
| 591 #endif | 593 #endif |
| 592 | 594 |
| 593 CommandLine::Init(argc, argv); | 595 CommandLine::Init(argc, argv); |
| 594 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 596 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 595 | 597 |
| 596 Profiling::ProcessStarted(); | 598 Profiling::ProcessStarted(); |
| 597 | 599 |
| 598 #if defined(OS_POSIX) | 600 #if defined(OS_POSIX) |
| 599 if (HandleVersionSwitches(command_line)) | 601 if (HandleVersionSwitches(command_line)) |
| 600 return 0; // Got a --version switch; exit with a success error code. | 602 return 0; // Got a --version switch; exit with a success error code. |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 894 | 896 |
| 895 if (SubprocessNeedsResourceBundle(process_type)) | 897 if (SubprocessNeedsResourceBundle(process_type)) |
| 896 ResourceBundle::CleanupSharedInstance(); | 898 ResourceBundle::CleanupSharedInstance(); |
| 897 | 899 |
| 898 logging::CleanupChromeLogging(); | 900 logging::CleanupChromeLogging(); |
| 899 | 901 |
| 900 chrome_main::LowLevelShutdown(); | 902 chrome_main::LowLevelShutdown(); |
| 901 | 903 |
| 902 return exit_code; | 904 return exit_code; |
| 903 } | 905 } |
| OLD | NEW |