Index: base/sys_info_mac.cc |
diff --git a/base/sys_info_mac.cc b/base/sys_info_mac.cc |
index 57e1f835e32967778f27e7c143455640323f3b5c..18df62482ea119db2d865f1745cf9de271767a19 100644 |
--- a/base/sys_info_mac.cc |
+++ b/base/sys_info_mac.cc |
@@ -85,4 +85,12 @@ std::string SysInfo::CPUModelName() { |
return std::string(); |
} |
+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); |
+ return std::string(); |
+} |
+ |
} // namespace base |