diff options
-rw-r--r-- | chrome/app/breakpad.cc | 10 | ||||
-rw-r--r-- | chrome/app/chrome_exe_main.cc | 7 |
2 files changed, 11 insertions, 6 deletions
diff --git a/chrome/app/breakpad.cc b/chrome/app/breakpad.cc index 26bafd7..83653d3 100644 --- a/chrome/app/breakpad.cc +++ b/chrome/app/breakpad.cc @@ -41,6 +41,7 @@ #include "base/string_util.h" #include "base/win_util.h" #include "chrome/app/google_update_client.h" +#include "chrome/app/google_update_settings.h" #include "breakpad/src/client/windows/handler/exception_handler.h" namespace { @@ -205,6 +206,15 @@ unsigned __stdcall InitCrashReporterThread(void* param) { if (use_crash_service) { pipe_name = kChromePipeName; } else { + // We want to use the Google Update crash reporting. We need to check if the + // user allows it first. + if (!GoogleUpdateSettings::GetCollectStatsConsent()) { + // The user did not allow Google Update to send crashes, we need to use + // our default crash handler instead. + InitDefaultCrashCallback(); + return 0; + } + // Build the pipe name. std::wstring user_sid; if (!win_util::GetUserSidString(&user_sid)) { diff --git a/chrome/app/chrome_exe_main.cc b/chrome/app/chrome_exe_main.cc index a28ad16..d95fab7 100644 --- a/chrome/app/chrome_exe_main.cc +++ b/chrome/app/chrome_exe_main.cc @@ -36,7 +36,6 @@ #include "base/debug_on_start.h" #include "chrome/app/breakpad.h" #include "chrome/app/google_update_client.h" -#include "chrome/app/google_update_settings.h" #include "chrome/app/result_codes.h" #include "chrome/common/chrome_switches.h" #include "sandbox/src/sandbox_factory.h" @@ -89,11 +88,7 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE prev_instance, client.Init(L"{8A69D345-D564-463c-AFF1-A69D9E530F96}", dll_name); // Initialize the crash reporter. - if (GoogleUpdateSettings::GetCollectStatsConsent()) { - InitCrashReporter(client.GetDLLPath()); - } else { - InitDefaultCrashCallback(); - } + InitCrashReporter(client.GetDLLPath()); bool exit_now = false; if (ShowRestartDialogIfCrashed(&exit_now)) { |