aboutsummaryrefslogtreecommitdiff
path: root/www/chromium/files/patch-chrome_browser_ui_webui_about__ui.cc
blob: e31738b4a29614ba1d0013a7c728a5efa733057b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
--- chrome/browser/ui/webui/about_ui.cc.orig	2017-06-21 00:03:13.000000000 +0200
+++ chrome/browser/ui/webui/about_ui.cc	2017-06-27 01:22:41.801626000 +0200
@@ -420,7 +420,7 @@
   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";
 
@@ -539,11 +539,13 @@
   output.append(base::StringPrintf("<a href='%s%s'>Discard tab now</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)));
@@ -575,12 +577,13 @@
   output.append(AddStringRow(
       "Graphics", base::IntToString(meminfo.gem_size / 1024 / 1024)));
 #endif  // OS_CHROMEOS
+#endif
   output.append("</table>");
   AppendFooter(&output);
   return output;
 }
 
-#endif  // OS_WIN || OS_MACOSX || OS_LINUX
+#endif  // OS_WIN || OS_MACOSX || OS_LINUX || defined(OS_BSD)
 
 // AboutDnsHandler bounces the request back to the IO thread to collect
 // the DNS information.
@@ -642,7 +645,7 @@
   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,
@@ -717,14 +720,14 @@
     } else {
       response = raw_response.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