diff options
author | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-19 22:50:38 +0000 |
---|---|---|
committer | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-19 22:50:38 +0000 |
commit | c8b0eb2495c63de99a2fa1dc81e9c2edb1700e87 (patch) | |
tree | 929a29c478263b571575fe6e7c1060b813b86f6b /chrome | |
parent | 2bfd1f166faf62fda3d6783dc77b4fe7a101ecec (diff) | |
download | chromium_src-c8b0eb2495c63de99a2fa1dc81e9c2edb1700e87.zip chromium_src-c8b0eb2495c63de99a2fa1dc81e9c2edb1700e87.tar.gz chromium_src-c8b0eb2495c63de99a2fa1dc81e9c2edb1700e87.tar.bz2 |
Add channel information to Windows crash reports.
BUG=96179
Review URL: http://codereview.chromium.org/7885019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101854 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/app/breakpad_win.cc | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/chrome/app/breakpad_win.cc b/chrome/app/breakpad_win.cc index a9e1b8a..8cc5ed4 100644 --- a/chrome/app/breakpad_win.cc +++ b/chrome/app/breakpad_win.cc @@ -182,7 +182,8 @@ void SetPluginPath(const std::wstring& path) { // Returns the custom info structure based on the dll in parameter and the // process type. google_breakpad::CustomClientInfo* GetCustomInfo(const std::wstring& dll_path, - const std::wstring& type) { + const std::wstring& type, + const std::wstring& channel) { scoped_ptr<FileVersionInfo> version_info(FileVersionInfo::CreateFileVersionInfo(FilePath(dll_path))); @@ -221,6 +222,8 @@ google_breakpad::CustomClientInfo* GetCustomInfo(const std::wstring& dll_path, google_breakpad::CustomInfoEntry(L"plat", L"Win32")); g_custom_entries->push_back( google_breakpad::CustomInfoEntry(L"ptype", type.c_str())); + g_custom_entries->push_back( + google_breakpad::CustomInfoEntry(L"channel", channel.c_str())); if (!special_build.empty()) g_custom_entries->push_back( @@ -574,9 +577,17 @@ static DWORD __stdcall InitCrashReporterThread(void* param) { scoped_ptr<CrashReporterInfo> info( reinterpret_cast<CrashReporterInfo*>(param)); + bool is_per_user_install = + InstallUtil::IsPerUserInstall(info->dll_path.c_str()); + + std::wstring channel_string; + GoogleUpdateSettings::GetChromeChannelAndModifiers(!is_per_user_install, + &channel_string); + // GetCustomInfo can take a few milliseconds to get the file information, so // we do it here so it can run in a separate thread. - info->custom_info = GetCustomInfo(info->dll_path, info->process_type); + info->custom_info = GetCustomInfo(info->dll_path, info->process_type, + channel_string); google_breakpad::ExceptionHandler::MinidumpCallback callback = NULL; LPTOP_LEVEL_EXCEPTION_FILTER default_filter = NULL; @@ -600,8 +611,6 @@ static DWORD __stdcall InitCrashReporterThread(void* param) { ((command.HasSwitch(switches::kNoErrorDialogs) || GetEnvironmentVariable( ASCIIToWide(env_vars::kHeadless).c_str(), NULL, 0))); - bool is_per_user_install = - InstallUtil::IsPerUserInstall(info->dll_path.c_str()); std::wstring pipe_name; if (use_crash_service) { @@ -659,9 +668,6 @@ static DWORD __stdcall InitCrashReporterThread(void* param) { dump_type = kFullDumpType; } else { // Capture more detail in crash dumps for beta and dev channel builds. - string16 channel_string; - GoogleUpdateSettings::GetChromeChannelAndModifiers(!is_per_user_install, - &channel_string); if (channel_string == L"dev" || channel_string == L"beta" || channel_string == GoogleChromeSxSDistribution::ChannelName()) dump_type = kLargerDumpType; |