| 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/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/debug/debugger.h" | 8 #include "base/debug/debugger.h" |
| 9 #include "base/i18n/icu_util.h" | 9 #include "base/i18n/icu_util.h" |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 "chrome/common/mac/cfbundle_blocker.h" |
| 69 #include "chrome/common/mac/objc_zombie.h" |
| 69 #include "content/browser/mach_broker_mac.h" | 70 #include "content/browser/mach_broker_mac.h" |
| 70 #include "grit/chromium_strings.h" | 71 #include "grit/chromium_strings.h" |
| 71 #include "third_party/WebKit/Source/WebKit/mac/WebCoreSupport/WebSystemInterface
.h" | 72 #include "third_party/WebKit/Source/WebKit/mac/WebCoreSupport/WebSystemInterface
.h" |
| 72 #include "ui/base/l10n/l10n_util_mac.h" | 73 #include "ui/base/l10n/l10n_util_mac.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> |
| 78 #endif | 79 #endif |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 577 public: | 578 public: |
| 578 virtual bool BasicStartupComplete( | 579 virtual bool BasicStartupComplete( |
| 579 int* exit_code, | 580 int* exit_code, |
| 580 base::mac::ScopedNSAutoreleasePool* autorelease_pool) OVERRIDE { | 581 base::mac::ScopedNSAutoreleasePool* autorelease_pool) OVERRIDE { |
| 581 autorelease_pool_ = autorelease_pool; | 582 autorelease_pool_ = autorelease_pool; |
| 582 #if defined(OS_CHROMEOS) | 583 #if defined(OS_CHROMEOS) |
| 583 chromeos::BootTimesLoader::Get()->SaveChromeMainStats(); | 584 chromeos::BootTimesLoader::Get()->SaveChromeMainStats(); |
| 584 #endif | 585 #endif |
| 585 | 586 |
| 586 #if defined(OS_MACOSX) | 587 #if defined(OS_MACOSX) |
| 588 // TODO(shess): Enable zombies for everyone. http://crbug.com/94551 |
| 589 DCHECK(ObjcEvilDoers::ZombieEnable(true, 1000)); |
| 587 chrome_main::SetUpBundleOverrides(); | 590 chrome_main::SetUpBundleOverrides(); |
| 588 chrome::common::mac::EnableCFBundleBlocker(); | 591 chrome::common::mac::EnableCFBundleBlocker(); |
| 589 #endif | 592 #endif |
| 590 | 593 |
| 591 Profiling::ProcessStarted(); | 594 Profiling::ProcessStarted(); |
| 592 | 595 |
| 593 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 596 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 594 std::string process_type = | 597 std::string process_type = |
| 595 command_line.GetSwitchValueASCII(switches::kProcessType); | 598 command_line.GetSwitchValueASCII(switches::kProcessType); |
| 596 | 599 |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 953 | 956 |
| 954 #if defined(OS_MACOSX) && defined(GOOGLE_CHROME_BUILD) | 957 #if defined(OS_MACOSX) && defined(GOOGLE_CHROME_BUILD) |
| 955 // TODO(mark): See the TODO(mark) at InitCrashReporter. | 958 // TODO(mark): See the TODO(mark) at InitCrashReporter. |
| 956 DestructCrashReporter(); | 959 DestructCrashReporter(); |
| 957 #endif // OS_MACOSX && GOOGLE_CHROME_BUILD | 960 #endif // OS_MACOSX && GOOGLE_CHROME_BUILD |
| 958 | 961 |
| 959 content::ContentMainEnd(); | 962 content::ContentMainEnd(); |
| 960 | 963 |
| 961 return exit_code; | 964 return exit_code; |
| 962 } | 965 } |
| OLD | NEW |