Chromium Code Reviews| Index: base/sys_info_ios.mm |
| diff --git a/base/sys_info_ios.mm b/base/sys_info_ios.mm |
| index 9a329b9f0924bbdefce908cd51de4a6488c574f0..7dc4effed932680d9a271609192e7d87c10fcd04 100644 |
| --- a/base/sys_info_ios.mm |
| +++ b/base/sys_info_ios.mm |
| @@ -101,4 +101,13 @@ std::string SysInfo::CPUModelName() { |
| return std::string(); |
| } |
| +// static |
| +std::string SysInfo::HardwareModelName() { |
| + char model[256]; |
| + size_t len = sizeof(model); |
| + if (sysctlbyname("hw.model", model, &len, NULL, 0) == 0) |
| + return std::string(model, 0, len); |
|
Mark Mentovai
2017/05/04 16:29:13
This is weird. I don’t think that there’s a std::s
Alexei Svitkine (slow)
2017/05/04 16:44:07
Good catch - done for both Mac and iOS and made CP
|
| + return std::string(); |
| +} |
| + |
| } // namespace base |