Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Side by Side Diff: chrome/app/chrome_main.cc

Issue 7826016: [Mac] Enable CrZombie for all processes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Whitespace, and verify merge. Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chrome_browser_application_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/metrics/stats_counters.h" 10 #include "base/metrics/stats_counters.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 #include "tools/memory_watcher/memory_watcher.h" 50 #include "tools/memory_watcher/memory_watcher.h"
51 #endif 51 #endif
52 52
53 #if defined(OS_MACOSX) 53 #if defined(OS_MACOSX)
54 #include "base/mac/mac_util.h" 54 #include "base/mac/mac_util.h"
55 #include "base/mac/os_crash_dumps.h" 55 #include "base/mac/os_crash_dumps.h"
56 #include "chrome/app/breakpad_mac.h" 56 #include "chrome/app/breakpad_mac.h"
57 #include "chrome/browser/mac/relauncher.h" 57 #include "chrome/browser/mac/relauncher.h"
58 #include "chrome/common/chrome_paths_internal.h" 58 #include "chrome/common/chrome_paths_internal.h"
59 #include "chrome/common/mac/cfbundle_blocker.h" 59 #include "chrome/common/mac/cfbundle_blocker.h"
60 #include "chrome/common/mac/objc_zombie.h"
60 #include "grit/chromium_strings.h" 61 #include "grit/chromium_strings.h"
61 #include "third_party/WebKit/Source/WebKit/mac/WebCoreSupport/WebSystemInterface .h" 62 #include "third_party/WebKit/Source/WebKit/mac/WebCoreSupport/WebSystemInterface .h"
62 #include "ui/base/l10n/l10n_util_mac.h" 63 #include "ui/base/l10n/l10n_util_mac.h"
63 #endif 64 #endif
64 65
65 #if defined(OS_POSIX) 66 #if defined(OS_POSIX)
66 #include <locale.h> 67 #include <locale.h>
67 #include <signal.h> 68 #include <signal.h>
68 #endif 69 #endif
69 70
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 }; 355 };
355 356
356 class ChromeMainDelegate : public content::ContentMainDelegate { 357 class ChromeMainDelegate : public content::ContentMainDelegate {
357 public: 358 public:
358 virtual bool BasicStartupComplete(int* exit_code) OVERRIDE { 359 virtual bool BasicStartupComplete(int* exit_code) OVERRIDE {
359 #if defined(OS_CHROMEOS) 360 #if defined(OS_CHROMEOS)
360 chromeos::BootTimesLoader::Get()->SaveChromeMainStats(); 361 chromeos::BootTimesLoader::Get()->SaveChromeMainStats();
361 #endif 362 #endif
362 363
363 #if defined(OS_MACOSX) 364 #if defined(OS_MACOSX)
365 // TODO(shess): Enable zombies for everyone. http://crbug.com/94551
366 DCHECK(ObjcEvilDoers::ZombieEnable(true, 1000));
364 chrome_main::SetUpBundleOverrides(); 367 chrome_main::SetUpBundleOverrides();
365 chrome::common::mac::EnableCFBundleBlocker(); 368 chrome::common::mac::EnableCFBundleBlocker();
366 #endif 369 #endif
367 370
368 Profiling::ProcessStarted(); 371 Profiling::ProcessStarted();
369 372
370 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 373 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
371 std::string process_type = 374 std::string process_type =
372 command_line.GetSwitchValueASCII(switches::kProcessType); 375 command_line.GetSwitchValueASCII(switches::kProcessType);
373 376
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 DLLEXPORT int __cdecl ChromeMain(HINSTANCE instance, 752 DLLEXPORT int __cdecl ChromeMain(HINSTANCE instance,
750 sandbox::SandboxInterfaceInfo* sandbox_info) { 753 sandbox::SandboxInterfaceInfo* sandbox_info) {
751 ChromeMainDelegate chrome_main_delegate; 754 ChromeMainDelegate chrome_main_delegate;
752 return content::ContentMain(instance, sandbox_info, &chrome_main_delegate); 755 return content::ContentMain(instance, sandbox_info, &chrome_main_delegate);
753 #elif defined(OS_POSIX) 756 #elif defined(OS_POSIX)
754 int ChromeMain(int argc, char** argv) { 757 int ChromeMain(int argc, char** argv) {
755 ChromeMainDelegate chrome_main_delegate; 758 ChromeMainDelegate chrome_main_delegate;
756 return content::ContentMain(argc, argv, &chrome_main_delegate); 759 return content::ContentMain(argc, argv, &chrome_main_delegate);
757 #endif 760 #endif
758 } 761 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chrome_browser_application_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698