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

Unified Diff: chrome/app/chrome_main_delegate.cc

Issue 1001103002: Crashpad! (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sign crashpad_handler Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/chrome_crash_reporter_client_mac.mm ('k') | chrome/browser/chrome_browser_main_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/chrome_main_delegate.cc
diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc
index e17bf8128a60481133fadce18f5e95458de29590..727ac0d0d801b6d5b59d6dcf720cf6c7557eb868 100644
--- a/chrome/app/chrome_main_delegate.cc
+++ b/chrome/app/chrome_main_delegate.cc
@@ -54,12 +54,11 @@
#if defined(OS_MACOSX)
#include "base/mac/foundation_util.h"
-#include "base/mac/os_crash_dumps.h"
#include "chrome/app/chrome_main_mac.h"
#include "chrome/browser/mac/relauncher.h"
#include "chrome/common/mac/cfbundle_blocker.h"
#include "chrome/common/mac/objc_zombie.h"
-#include "components/crash/app/breakpad_mac.h"
+#include "components/crash/app/crashpad_mac.h"
#include "ui/base/l10n/l10n_util_mac.h"
#endif
@@ -557,39 +556,11 @@ bool ChromeMainDelegate::BasicStartupComplete(int* exit_code) {
void ChromeMainDelegate::InitMacCrashReporter(
const base::CommandLine& command_line,
const std::string& process_type) {
- // TODO(mark): Right now, InitCrashReporter() needs to be called after
- // CommandLine::Init() and chrome::RegisterPathProvider(). Ideally,
- // Breakpad initialization could occur sooner, preferably even before the
- // framework dylib is even loaded, to catch potential early crashes.
- breakpad::InitCrashReporter(process_type);
-
-#if defined(NDEBUG)
- bool is_debug_build = false;
-#else
- bool is_debug_build = true;
-#endif
-
- // Details on when we enable Apple's Crash reporter.
- //
- // Motivation:
- // In debug mode it takes Apple's crash reporter eons to generate a crash
- // dump.
- //
- // What we do:
- // * We only pass crashes for foreground processes to Apple's Crash
- // reporter. At the time of this writing, that means just the Browser
- // process.
- // * If Breakpad is enabled, it will pass browser crashes to Crash Reporter
- // itself.
- // * If Breakpad is disabled, we only turn on Crash Reporter for the
- // Browser process in release mode.
- if (!command_line.HasSwitch(switches::kDisableBreakpad)) {
- bool disable_apple_crash_reporter = is_debug_build ||
- base::mac::IsBackgroundOnlyProcess();
- if (!breakpad::IsCrashReporterEnabled() && disable_apple_crash_reporter) {
- base::mac::DisableOSCrashDumps();
- }
- }
+ // TODO(mark): Right now, InitializeCrashpad() needs to be called after
+ // CommandLine::Init() and chrome::RegisterPathProvider(). Ideally, Crashpad
+ // initialization could occur sooner, preferably even before the framework
+ // dylib is even loaded, to catch potential early crashes.
+ crash_reporter::InitializeCrashpad(process_type);
// Mac Chrome is packaged with a main app bundle and a helper app bundle.
// The main app bundle should only be used for the browser process, so it
@@ -644,9 +615,6 @@ void ChromeMainDelegate::InitMacCrashReporter(
process_type.empty())
<< "Main application forbids --type, saw " << process_type;
}
-
- if (breakpad::IsCrashReporterEnabled())
- breakpad::InitCrashProcessInfo(process_type);
}
#endif // defined(OS_MACOSX)
« no previous file with comments | « chrome/app/chrome_crash_reporter_client_mac.mm ('k') | chrome/browser/chrome_browser_main_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698