summaryrefslogtreecommitdiffstats
path: root/chrome/common/child_process_logging_win.cc
diff options
context:
space:
mode:
authorrlp@chromium.org <rlp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-19 07:51:33 +0000
committerrlp@chromium.org <rlp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-19 07:51:33 +0000
commita110dd1ff6a3b8507ee164ababea537df52642cb (patch)
tree46853998912416850c21a7e944777065fdbbbc73 /chrome/common/child_process_logging_win.cc
parent52de9b3eb755b02c6ac52b741daa7ad7f333cd91 (diff)
downloadchromium_src-a110dd1ff6a3b8507ee164ababea537df52642cb.zip
chromium_src-a110dd1ff6a3b8507ee164ababea537df52642cb.tar.gz
chromium_src-a110dd1ff6a3b8507ee164ababea537df52642cb.tar.bz2
Adding gpu_info to the breakpad info collection before sending off a crash.
BUG=38737 TEST=none Review URL: http://codereview.chromium.org/3034004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52884 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/child_process_logging_win.cc')
-rw-r--r--chrome/common/child_process_logging_win.cc23
1 files changed, 23 insertions, 0 deletions
diff --git a/chrome/common/child_process_logging_win.cc b/chrome/common/child_process_logging_win.cc
index 3513a93..1b18e6e 100644
--- a/chrome/common/child_process_logging_win.cc
+++ b/chrome/common/child_process_logging_win.cc
@@ -23,6 +23,11 @@ typedef void (__cdecl *MainSetClientId)(const wchar_t*);
// void __declspec(dllexport) __cdecl SetExtensionID.
typedef void (__cdecl *MainSetExtensionID)(size_t, const wchar_t*);
+// exported in breakpad_win.cc: void __declspec(dllexport) __cdecl SetGpuInfo.
+typedef void (__cdecl *MainSetGpuInfo)(const wchar_t*, const wchar_t*,
+ const wchar_t*, const wchar_t*,
+ const wchar_t*);
+
void SetActiveURL(const GURL& url) {
static MainSetActiveURL set_active_url = NULL;
// note: benign race condition on set_active_url.
@@ -89,4 +94,22 @@ void SetActiveExtensions(const std::set<std::string>& extension_ids) {
}
}
+void SetGpuInfo(const GPUInfo& gpu_info) {
+ static MainSetGpuInfo set_gpu_info = NULL;
+ if (!set_gpu_info) {
+ HMODULE exe_module = GetModuleHandle(chrome::kBrowserProcessExecutableName);
+ if (!exe_module)
+ return;
+ set_gpu_info = reinterpret_cast<MainSetGpuInfo>(
+ GetProcAddress(exe_module, "SetGpuInfo"));
+ if (!set_gpu_info)
+ return;
+ }
+ (set_gpu_info)(UintToWString(gpu_info.vendor_id()).c_str(),
+ UintToWString(gpu_info.device_id()).c_str(),
+ gpu_info.driver_version().c_str(),
+ UintToWString(gpu_info.pixel_shader_version()).c_str(),
+ UintToWString(gpu_info.vertex_shader_version()).c_str());
+}
+
} // namespace child_process_logging