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

Unified Diff: chrome/common/child_process_logging_win.cc

Issue 3034004: Adding gpu_info to the breakpad info collection before sending off a crash.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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/common/child_process_logging_mac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/child_process_logging_win.cc
===================================================================
--- chrome/common/child_process_logging_win.cc (revision 52838)
+++ chrome/common/child_process_logging_win.cc (working copy)
@@ -23,6 +23,11 @@
// 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 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
« no previous file with comments | « chrome/common/child_process_logging_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698