diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-09 19:59:25 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-09 19:59:25 +0000 |
commit | 3b781fed071f7681c6113dd0042388ceaf7f4d15 (patch) | |
tree | c450c72a09a9e8ae442cd0c3b9902df046077537 /chrome_frame/crash_reporting | |
parent | 273865aa130f61f321d3eeafc0ea5a2a6dc9adf8 (diff) | |
download | chromium_src-3b781fed071f7681c6113dd0042388ceaf7f4d15.zip chromium_src-3b781fed071f7681c6113dd0042388ceaf7f4d15.tar.gz chromium_src-3b781fed071f7681c6113dd0042388ceaf7f4d15.tar.bz2 |
The ChromeFrame crash reporting code should not depend on chrome frame as it is also linked
in by toolbar.
This CL gets rid of this dependency and also ensures that full crash dumps are gathered during
chrome frame reliability test runs.
Review URL: http://codereview.chromium.org/481003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34180 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/crash_reporting')
-rw-r--r-- | chrome_frame/crash_reporting/crash_report.cc | 31 | ||||
-rw-r--r-- | chrome_frame/crash_reporting/crash_report.h | 7 |
2 files changed, 26 insertions, 12 deletions
diff --git a/chrome_frame/crash_reporting/crash_report.cc b/chrome_frame/crash_reporting/crash_report.cc index f858941..43d602d 100644 --- a/chrome_frame/crash_reporting/crash_report.cc +++ b/chrome_frame/crash_reporting/crash_report.cc @@ -11,12 +11,10 @@ #include "breakpad/src/client/windows/handler/exception_handler.h" #include "chrome_frame/crash_reporting/vectored_handler.h" #include "chrome_frame/crash_reporting/vectored_handler-impl.h" -#include "chrome_frame/utils.h" namespace { // TODO(joshia): factor out common code with chrome used for crash reporting const wchar_t kGoogleUpdatePipeName[] = L"\\\\.\\pipe\\GoogleCrashServices\\"; -const wchar_t kChromePipeName[] = L"\\\\.\\pipe\\ChromeCrashServices"; google_breakpad::ExceptionHandler* g_breakpad = NULL; @@ -61,26 +59,19 @@ class Win32VEHTraits : public VEHTraitsBase { extern "C" IMAGE_DOS_HEADER __ImageBase; std::wstring GetCrashServerPipeName(const std::wstring& user_sid) { - if (IsHeadlessMode()) - return kChromePipeName; - std::wstring pipe_name = kGoogleUpdatePipeName; pipe_name += user_sid; return pipe_name; } -bool InitializeVectoredCrashReporting( +bool InitializeVectoredCrashReportingWithPipeName( bool full_dump, - const wchar_t* user_sid, + const wchar_t* pipe_name, const std::wstring& dump_path, google_breakpad::CustomClientInfo* client_info) { - DCHECK(user_sid); - DCHECK(client_info); if (g_breakpad) return true; - std::wstring pipe_name = GetCrashServerPipeName(user_sid); - if (dump_path.empty()) { return false; } @@ -90,7 +81,7 @@ bool InitializeVectoredCrashReporting( dump_path, NULL, NULL, NULL, google_breakpad::ExceptionHandler::HANDLER_INVALID_PARAMETER | google_breakpad::ExceptionHandler::HANDLER_PURECALL, dump_type, - pipe_name.c_str(), client_info); + pipe_name, client_info); if (g_breakpad) { // Find current module boundaries. @@ -105,6 +96,22 @@ bool InitializeVectoredCrashReporting( return g_breakpad != NULL; } +bool InitializeVectoredCrashReporting( + bool full_dump, + const wchar_t* user_sid, + const std::wstring& dump_path, + google_breakpad::CustomClientInfo* client_info) { + DCHECK(user_sid); + DCHECK(client_info); + + std::wstring pipe_name = GetCrashServerPipeName(user_sid); + + return InitializeVectoredCrashReportingWithPipeName(full_dump, + pipe_name.c_str(), + dump_path, + client_info); +} + bool ShutdownVectoredCrashReporting() { VectoredHandler::Unregister(); delete g_breakpad; diff --git a/chrome_frame/crash_reporting/crash_report.h b/chrome_frame/crash_reporting/crash_report.h index 0bcc89b..e98fd05 100644 --- a/chrome_frame/crash_reporting/crash_report.h +++ b/chrome_frame/crash_reporting/crash_report.h @@ -16,6 +16,13 @@ bool InitializeVectoredCrashReporting( const wchar_t* user_sid, const std::wstring& dump_path, google_breakpad::CustomClientInfo* client_info); + +bool InitializeVectoredCrashReportingWithPipeName( + bool full_dump, + const wchar_t* pipe_name, + const std::wstring& dump_path, + google_breakpad::CustomClientInfo* client_info); + bool ShutdownVectoredCrashReporting(); #endif // CHROME_FRAME_CRASH_REPORTING_CRASH_REPORT_H_ |