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

Side by Side 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, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/child_process_logging_win.cc ('k') | chrome/common/crash_keys.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/common/chrome_content_client.h" 5 #include "chrome/common/chrome_content_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/cpu.h" 8 #include "base/cpu.h"
9 #include "base/debug/crash_logging.h" 9 #include "base/debug/crash_logging.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 11 matching lines...) Expand all
22 #include "chrome/common/crash_keys.h" 22 #include "chrome/common/crash_keys.h"
23 #include "chrome/common/pepper_flash.h" 23 #include "chrome/common/pepper_flash.h"
24 #include "chrome/common/render_messages.h" 24 #include "chrome/common/render_messages.h"
25 #include "chrome/common/url_constants.h" 25 #include "chrome/common/url_constants.h"
26 #include "components/nacl/common/nacl_process_type.h" 26 #include "components/nacl/common/nacl_process_type.h"
27 #include "content/public/common/content_constants.h" 27 #include "content/public/common/content_constants.h"
28 #include "content/public/common/content_switches.h" 28 #include "content/public/common/content_switches.h"
29 #include "content/public/common/pepper_plugin_info.h" 29 #include "content/public/common/pepper_plugin_info.h"
30 #include "content/public/common/url_constants.h" 30 #include "content/public/common/url_constants.h"
31 #include "extensions/common/constants.h" 31 #include "extensions/common/constants.h"
32 #include "gpu/config/gpu_info.h"
32 #include "grit/common_resources.h" 33 #include "grit/common_resources.h"
33 #include "ppapi/shared_impl/ppapi_permissions.h" 34 #include "ppapi/shared_impl/ppapi_permissions.h"
34 #include "remoting/client/plugin/pepper_entrypoints.h" 35 #include "remoting/client/plugin/pepper_entrypoints.h"
35 #include "ui/base/l10n/l10n_util.h" 36 #include "ui/base/l10n/l10n_util.h"
36 #include "ui/base/layout.h" 37 #include "ui/base/layout.h"
37 #include "ui/base/resource/resource_bundle.h" 38 #include "ui/base/resource/resource_bundle.h"
38 #include "webkit/common/user_agent/user_agent_util.h" 39 #include "webkit/common/user_agent/user_agent_util.h"
39 40
40 #include "flapper_version.h" // In SHARED_INTERMEDIATE_DIR. 41 #include "flapper_version.h" // In SHARED_INTERMEDIATE_DIR.
41 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. 42 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 } // namespace 387 } // namespace
387 388
388 namespace chrome { 389 namespace chrome {
389 390
390 void ChromeContentClient::SetActiveURL(const GURL& url) { 391 void ChromeContentClient::SetActiveURL(const GURL& url) {
391 base::debug::SetCrashKeyValue(crash_keys::kActiveURL, 392 base::debug::SetCrashKeyValue(crash_keys::kActiveURL,
392 url.possibly_invalid_spec()); 393 url.possibly_invalid_spec());
393 } 394 }
394 395
395 void ChromeContentClient::SetGpuInfo(const gpu::GPUInfo& gpu_info) { 396 void ChromeContentClient::SetGpuInfo(const gpu::GPUInfo& gpu_info) {
396 child_process_logging::SetGpuInfo(gpu_info); 397 #if !defined(OS_ANDROID)
398 base::debug::SetCrashKeyValue(crash_keys::kGPUVendorID,
399 base::StringPrintf("0x%04x", gpu_info.gpu.vendor_id));
400 base::debug::SetCrashKeyValue(crash_keys::kGPUDeviceID,
401 base::StringPrintf("0x%04x", gpu_info.gpu.device_id));
402 #endif
403 base::debug::SetCrashKeyValue(crash_keys::kGPUDriverVersion,
404 gpu_info.driver_version);
405 base::debug::SetCrashKeyValue(crash_keys::kGPUPixelShaderVersion,
406 gpu_info.pixel_shader_version);
407 base::debug::SetCrashKeyValue(crash_keys::kGPUVertexShaderVersion,
408 gpu_info.vertex_shader_version);
409 #if defined(OS_LINUX)
410 base::debug::SetCrashKeyValue(crash_keys::kGPUVendor, gpu_info.gl_vendor);
411 base::debug::SetCrashKeyValue(crash_keys::kGPURenderer, gpu_info.gl_renderer);
412 #elif defined(OS_MACOSX)
413 base::debug::SetCrashKeyValue(crash_keys::kGPUGLVersion, gpu_info.gl_version);
414 #endif
397 } 415 }
398 416
399 void ChromeContentClient::AddPepperPlugins( 417 void ChromeContentClient::AddPepperPlugins(
400 std::vector<content::PepperPluginInfo>* plugins) { 418 std::vector<content::PepperPluginInfo>* plugins) {
401 ComputeBuiltInPlugins(plugins); 419 ComputeBuiltInPlugins(plugins);
402 AddPepperFlashFromCommandLine(plugins); 420 AddPepperFlashFromCommandLine(plugins);
403 421
404 content::PepperPluginInfo plugin; 422 content::PepperPluginInfo plugin;
405 if (GetBundledPepperFlash(&plugin)) 423 if (GetBundledPepperFlash(&plugin))
406 plugins->push_back(plugin); 424 plugins->push_back(plugin);
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 } 505 }
488 return false; 506 return false;
489 } 507 }
490 508
491 std::string ChromeContentClient::GetCarbonInterposePath() const { 509 std::string ChromeContentClient::GetCarbonInterposePath() const {
492 return std::string(kInterposeLibraryPath); 510 return std::string(kInterposeLibraryPath);
493 } 511 }
494 #endif 512 #endif
495 513
496 } // namespace chrome 514 } // namespace chrome
OLDNEW
« 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