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

Unified Diff: chrome/app/breakpad_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 | « no previous file | chrome/browser/gpu_process_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/breakpad_win.cc
===================================================================
--- chrome/app/breakpad_win.cc (revision 52838)
+++ chrome/app/breakpad_win.cc (working copy)
@@ -62,6 +62,7 @@
static size_t g_url_chunks_offset;
static size_t g_extension_ids_offset;
static size_t g_client_id_offset;
+static size_t g_gpu_info_offset;
// Dumps the current process memory.
extern "C" void __declspec(dllexport) __cdecl DumpProcess() {
@@ -118,6 +119,18 @@
StringPrintf(L"extension-%i", i + 1).c_str(), L""));
}
+ // Add empty values for the gpu_info. We'll put the actual values
+ // when we collect them at this location.
+ g_gpu_info_offset = g_custom_entries->size();
+ g_custom_entries->push_back(google_breakpad::CustomInfoEntry(L"venid", L""));
+ g_custom_entries->push_back(google_breakpad::CustomInfoEntry(L"devid", L""));
+ g_custom_entries->push_back(
+ google_breakpad::CustomInfoEntry(L"driver", L""));
+ g_custom_entries->push_back(
+ google_breakpad::CustomInfoEntry(L"psver", L""));
+ g_custom_entries->push_back(
+ google_breakpad::CustomInfoEntry(L"vsver", L""));
+
// Read the id from registry. If reporting has never been enabled
// the result will be empty string. Its OK since when user enables reporting
// we will insert the new value at this location.
@@ -127,7 +140,7 @@
g_custom_entries->push_back(
google_breakpad::CustomInfoEntry(L"guid", guid.c_str()));
- if (type == L"renderer" || type == L"plugin") {
+ if (type == L"renderer" || type == L"plugin" || type == L"gpu-process") {
// Create entries for the URL. Currently we only allow each chunk to be 64
// characters, which isn't enough for a URL. As a hack we create 8 entries
// and split the URL across the g_custom_entries.
@@ -286,6 +299,27 @@
id);
}
+extern "C" void __declspec(dllexport) __cdecl SetGpuInfo(
+ const wchar_t* vendor_id, const wchar_t* device_id,
+ const wchar_t* driver_version, const wchar_t* pixel_shader_version,
+ const wchar_t* vertex_shader_version) {
+ wcscpy_s((*g_custom_entries)[g_client_id_offset].value,
+ google_breakpad::CustomInfoEntry::kValueMaxLength,
+ vendor_id);
+ wcscpy_s((*g_custom_entries)[g_client_id_offset+1].value,
+ google_breakpad::CustomInfoEntry::kValueMaxLength,
+ device_id);
+ wcscpy_s((*g_custom_entries)[g_client_id_offset+2].value,
+ google_breakpad::CustomInfoEntry::kValueMaxLength,
+ driver_version);
+ wcscpy_s((*g_custom_entries)[g_client_id_offset+3].value,
+ google_breakpad::CustomInfoEntry::kValueMaxLength,
+ pixel_shader_version);
+ wcscpy_s((*g_custom_entries)[g_client_id_offset+4].value,
+ google_breakpad::CustomInfoEntry::kValueMaxLength,
+ vertex_shader_version);
+}
+
} // namespace
bool WrapMessageBoxWithSEH(const wchar_t* text, const wchar_t* caption,
« no previous file with comments | « no previous file | chrome/browser/gpu_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698