| Index: base/sys_info_mac.cc
|
| diff --git a/base/sys_info_mac.cc b/base/sys_info_mac.cc
|
| index 1a1d23c236f6856ebb55157a0dcd56706ca4d6ef..3a936890342b94d37ddccdad1d5f19ecfe28785a 100644
|
| --- a/base/sys_info_mac.cc
|
| +++ b/base/sys_info_mac.cc
|
| @@ -8,6 +8,8 @@
|
| #include <CoreServices/CoreServices.h>
|
| #include <mach/mach_host.h>
|
| #include <mach/mach_init.h>
|
| +#include <sys/sysctl.h>
|
| +#include <sys/types.h>
|
|
|
| #include "base/logging.h"
|
| #include "base/stringprintf.h"
|
| @@ -54,4 +56,13 @@ int64 SysInfo::AmountOfPhysicalMemory() {
|
| return static_cast<int64>(hostinfo.max_mem);
|
| }
|
|
|
| +// static
|
| +std::string SysInfo::CPUModelName() {
|
| + char name[256];
|
| + size_t len = arraysize(name);
|
| + if (sysctlbyname("machdep.cpu.brand_string", &name, &len, NULL, 0) == 0)
|
| + return name;
|
| + return std::string();
|
| +}
|
| +
|
| } // namespace base
|
|
|