$OpenBSD: patch-chrome_browser_ui_webui_about_ui_cc,v 1.13 2017/10/28 07:36:00 robert Exp $

Index: chrome/browser/ui/webui/about_ui.cc
--- chrome/browser/ui/webui/about_ui.cc.orig
+++ chrome/browser/ui/webui/about_ui.cc
@@ -420,7 +420,7 @@ std::string ChromeURLs() {
   return html;
 }
 
-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
 
 const char kAboutDiscardsRunCommand[] = "run";
 const char kAboutDiscardsSkipUnloadHandlersCommand[] = "skip_unload_handlers";
@@ -564,10 +564,13 @@ std::string AboutDiscards(const std::string& path) {
       "<a href='%s%s'>Discard tab now (safely)</a>",
       chrome::kChromeUIDiscardsURL, kAboutDiscardsRunCommand));
 
+#if !defined(OS_BSD)
   base::SystemMemoryInfoKB meminfo;
   base::GetSystemMemoryInfo(&meminfo);
+#endif
   output.append("<h3>System memory information in MB</h3>");
   output.append("<table>");
+#if !defined(OS_BSD)
   // Start with summary statistics.
   output.append(AddStringRow(
       "Total", base::IntToString(meminfo.total / 1024)));
@@ -599,6 +602,7 @@ std::string AboutDiscards(const std::string& path) {
   output.append(AddStringRow(
       "Graphics", base::IntToString(meminfo.gem_size / 1024 / 1024)));
 #endif  // OS_CHROMEOS
+#endif
   output.append("</table>");
   AppendFooter(&output);
   return output;
@@ -666,7 +670,7 @@ class AboutDnsHandler : public base::RefCountedThreadS
   DISALLOW_COPY_AND_ASSIGN(AboutDnsHandler);
 };
 
-#if defined(OS_LINUX) || defined(OS_OPENBSD)
+#if defined(OS_LINUX) || defined(OS_BSD)
 std::string AboutLinuxProxyConfig() {
   std::string data;
   AppendHeader(&data, 0,
@@ -723,14 +727,14 @@ void AboutUIHTMLSource::StartDataRequest(
                      .as_string();
     }
 
-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
   } else if (source_name_ == chrome::kChromeUIDiscardsHost) {
     response = AboutDiscards(path);
 #endif
   } else if (source_name_ == chrome::kChromeUIDNSHost) {
     AboutDnsHandler::Start(profile(), callback);
     return;
-#if defined(OS_LINUX) || defined(OS_OPENBSD)
+#if defined(OS_LINUX) || defined(OS_BSD)
   } else if (source_name_ == chrome::kChromeUILinuxProxyConfigHost) {
     response = AboutLinuxProxyConfig();
 #endif
