diff options
author | zmo@chromium.org <zmo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-28 19:46:58 +0000 |
---|---|---|
committer | zmo@chromium.org <zmo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-28 19:46:58 +0000 |
commit | 76493bc89f30a28c27564b087608e39aea331f3a (patch) | |
tree | a5bc72e2598d2a6066db52846c23600a825f7508 /content/gpu | |
parent | 52ff7d936494f2cc8045cfae0791cd2afbe651c6 (diff) | |
download | chromium_src-76493bc89f30a28c27564b087608e39aea331f3a.zip chromium_src-76493bc89f30a28c27564b087608e39aea331f3a.tar.gz chromium_src-76493bc89f30a28c27564b087608e39aea331f3a.tar.bz2 |
Collect machine model info in gpu_info_collector and expose it to about:gpu.
BUG=158147
TEST=content_unittests, about:gpu page on Mac(manual)
Review URL: https://chromiumcodereview.appspot.com/11311021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164571 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/gpu')
-rw-r--r-- | content/gpu/gpu_info_collector_mac.mm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/content/gpu/gpu_info_collector_mac.mm b/content/gpu/gpu_info_collector_mac.mm index 4c31ed0..13e1340 100644 --- a/content/gpu/gpu_info_collector_mac.mm +++ b/content/gpu/gpu_info_collector_mac.mm @@ -8,9 +8,12 @@ #include "base/debug/trace_event.h" #include "base/logging.h" +#include "base/mac/mac_util.h" #include "base/mac/scoped_cftyperef.h" #include "base/memory/scoped_ptr.h" +#include "base/string_number_conversions.h" #include "base/string_piece.h" +#include "base/string_util.h" #include "base/sys_string_conversions.h" #include "ui/gl/gl_bindings.h" #include "ui/gl/gl_context.h" @@ -169,6 +172,14 @@ bool CollectGraphicsInfo(content::GPUInfo* gpu_info) { bool CollectPreliminaryGraphicsInfo(content::GPUInfo* gpu_info) { DCHECK(gpu_info); + std::string model_name; + int32 model_major = 0, model_minor = 0; + base::mac::ParseModelIdentifier(base::mac::GetModelIdentifier(), + &model_name, &model_major, &model_minor); + ReplaceChars(model_name, " ", "_", &gpu_info->machine_model); + gpu_info->machine_model += " " + base::IntToString(model_major) + + "." + base::IntToString(model_minor); + return CollectPCIVideoCardInfo(gpu_info); } |