--- base/system/sys_info_freebsd.cc.orig 2019-12-16 21:50:40 UTC
--- base/system/sys_info_freebsd.cc.orig 2020-06-24 07:44:41 UTC
+++ base/system/sys_info_freebsd.cc
@@ -13,26 +13,59 @@
@@ -13,26 +13,70 @@
namespace base {
int64_t SysInfo::AmountOfPhysicalMemoryImpl() {
+ if (sysctl(mib, base::size(mib), &name, &size, NULL, 0) == 0)
+ return name;
+ return std::string();
+}
+
+SysInfo::HardwareInfo SysInfo::GetHardwareInfoSync() {
+ HardwareInfo info;
+ // Set the manufacturer to "FreeBSD" and the model to
+ // an empty string.
+ info.manufacturer = "FreeBSD";
+ info.model = HardwareModelName();
+ DCHECK(IsStringUTF8(info.manufacturer));
+ DCHECK(IsStringUTF8(info.model));
+ return info;
+// static
--- components/sync_device_info/device_info_sync_bridge.cc.orig 2020-03-16 18:40:31 UTC
+++ components/sync_device_info/device_info_sync_bridge.cc
@@ -456,11 +456,13 @@ void DeviceInfoSyncBridge::OnStoreCreated(
return;
}
+#if !defined(OS_BSD)
store_ = std::move(store);
base::SysInfo::GetHardwareInfo(
base::BindOnce(&DeviceInfoSyncBridge::OnHardwareInfoRetrieved,
weak_ptr_factory_.GetWeakPtr()));
+#endif
void DeviceInfoSyncBridge::OnHardwareInfoRetrieved(