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

Unified Diff: chrome/common/chrome_content_client.cc

Issue 23021021: Set the GPU info using the crash key system instead of platform-specific mechanisms. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 7 years, 4 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_win.cc ('k') | chrome/common/crash_keys.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/chrome_content_client.cc
diff --git a/chrome/common/chrome_content_client.cc b/chrome/common/chrome_content_client.cc
index cfaa40e30e2f26fa1220d7a18d517789e802784f..3cd880da3a245ae8b6af76ebc0b27618c43ec585 100644
--- a/chrome/common/chrome_content_client.cc
+++ b/chrome/common/chrome_content_client.cc
@@ -29,6 +29,7 @@
#include "content/public/common/pepper_plugin_info.h"
#include "content/public/common/url_constants.h"
#include "extensions/common/constants.h"
+#include "gpu/config/gpu_info.h"
#include "grit/common_resources.h"
#include "ppapi/shared_impl/ppapi_permissions.h"
#include "remoting/client/plugin/pepper_entrypoints.h"
@@ -393,7 +394,24 @@ void ChromeContentClient::SetActiveURL(const GURL& url) {
}
void ChromeContentClient::SetGpuInfo(const gpu::GPUInfo& gpu_info) {
- child_process_logging::SetGpuInfo(gpu_info);
+#if !defined(OS_ANDROID)
+ base::debug::SetCrashKeyValue(crash_keys::kGPUVendorID,
+ base::StringPrintf("0x%04x", gpu_info.gpu.vendor_id));
+ base::debug::SetCrashKeyValue(crash_keys::kGPUDeviceID,
+ base::StringPrintf("0x%04x", gpu_info.gpu.device_id));
+#endif
+ base::debug::SetCrashKeyValue(crash_keys::kGPUDriverVersion,
+ gpu_info.driver_version);
+ base::debug::SetCrashKeyValue(crash_keys::kGPUPixelShaderVersion,
+ gpu_info.pixel_shader_version);
+ base::debug::SetCrashKeyValue(crash_keys::kGPUVertexShaderVersion,
+ gpu_info.vertex_shader_version);
+#if defined(OS_LINUX)
+ base::debug::SetCrashKeyValue(crash_keys::kGPUVendor, gpu_info.gl_vendor);
+ base::debug::SetCrashKeyValue(crash_keys::kGPURenderer, gpu_info.gl_renderer);
+#elif defined(OS_MACOSX)
+ base::debug::SetCrashKeyValue(crash_keys::kGPUGLVersion, gpu_info.gl_version);
+#endif
}
void ChromeContentClient::AddPepperPlugins(
« no previous file with comments | « chrome/common/child_process_logging_win.cc ('k') | chrome/common/crash_keys.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698