Remove Mac OS X Server support

Mac OS X Server has been discontinued as a separate operating system
flavor since 10.6. Current minimal requirements for both Crashpad and
Chromium are above that.

Change-Id: I0145ff36118a412b3f42d43c784aeb9574871c75
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4584570
Reviewed-by: Mark Mentovai <mark@chromium.org>
GitOrigin-RevId: 788b72f922bb123cc8c1c38ed75ba643873c8c7b
diff --git a/snapshot/mac/system_snapshot_mac.cc b/snapshot/mac/system_snapshot_mac.cc
index 3b17252..334627f 100644
--- a/snapshot/mac/system_snapshot_mac.cc
+++ b/snapshot/mac/system_snapshot_mac.cc
@@ -86,7 +86,6 @@
       os_version_major_(0),
       os_version_minor_(0),
       os_version_bugfix_(0),
-      os_server_(false),
       initialized_() {
 }
 
@@ -107,7 +106,6 @@
                          &os_version_minor_,
                          &os_version_bugfix_,
                          &os_version_build_,
-                         &os_server_,
                          &os_version_string);
 
   std::string uname_string;
@@ -304,7 +302,7 @@
 
 bool SystemSnapshotMac::OSServer() const {
   INITIALIZATION_STATE_DCHECK_VALID(initialized_);
-  return os_server_;
+  return false;
 }
 
 void SystemSnapshotMac::OSVersion(int* major,
diff --git a/snapshot/mac/system_snapshot_mac.h b/snapshot/mac/system_snapshot_mac.h
index cf8fbbe..275ae5f 100644
--- a/snapshot/mac/system_snapshot_mac.h
+++ b/snapshot/mac/system_snapshot_mac.h
@@ -93,7 +93,6 @@
   int os_version_major_;
   int os_version_minor_;
   int os_version_bugfix_;
-  bool os_server_;
   InitializationStateDcheck initialized_;
 };
 
diff --git a/util/mac/mac_util.cc b/util/mac/mac_util.cc
index a138234..ed2bfb7 100644
--- a/util/mac/mac_util.cc
+++ b/util/mac/mac_util.cc
@@ -45,7 +45,6 @@
 // TryCFCopy*VersionDictionary() helpers to account for the possibility that
 // they may not be present at runtime.
 CFDictionaryRef _CFCopySystemVersionDictionary() WEAK_IMPORT;
-CFDictionaryRef _CFCopyServerVersionDictionary() WEAK_IMPORT;
 
 // Don’t use these constants with CFDictionaryGetValue() directly, use them with
 // the TryCFDictionaryGetValue() wrapper to account for the possibility that
@@ -85,8 +84,8 @@
   int rv = uname(&uname_info);
   PCHECK(rv == 0) << "uname";
 
-  DCHECK_EQ(strcmp(uname_info.sysname, "Darwin"), 0) << "unexpected sysname "
-                                                     << uname_info.sysname;
+  DCHECK_EQ(strcmp(uname_info.sysname, "Darwin"), 0)
+      << "unexpected sysname " << uname_info.sysname;
 
   char* dot = strchr(uname_info.release, '.');
   CHECK(dot);
@@ -109,13 +108,6 @@
   return nullptr;
 }
 
-CFDictionaryRef TryCFCopyServerVersionDictionary() {
-  if (_CFCopyServerVersionDictionary) {
-    return _CFCopyServerVersionDictionary();
-  }
-  return nullptr;
-}
-
 const void* TryCFDictionaryGetValue(CFDictionaryRef dictionary,
                                     const void* value) {
   if (value) {
@@ -242,19 +234,12 @@
                             int* minor,
                             int* bugfix,
                             std::string* build,
-                            bool* server,
                             std::string* version_string) {
   base::ScopedCFTypeRef<CFDictionaryRef> dictionary(
-      TryCFCopyServerVersionDictionary());
-  if (dictionary) {
-    *server = true;
-  } else {
-    dictionary.reset(TryCFCopySystemVersionDictionary());
-    if (!dictionary) {
-      LOG(ERROR) << "_CFCopySystemVersionDictionary failed";
-      return false;
-    }
-    *server = false;
+      TryCFCopySystemVersionDictionary());
+  if (!dictionary) {
+    LOG(ERROR) << "_CFCopySystemVersionDictionary failed";
+    return false;
   }
 
   bool success = true;
@@ -338,8 +323,8 @@
     // alternative.
     CFStringRef kBoardProperty = CFSTR("target-type");
 #endif
-    board_id->assign(IORegistryEntryDataPropertyAsString(platform_expert,
-                                                         kBoardProperty));
+    board_id->assign(
+        IORegistryEntryDataPropertyAsString(platform_expert, kBoardProperty));
   } else {
     model->clear();
     board_id->clear();
diff --git a/util/mac/mac_util.h b/util/mac/mac_util.h
index c6215e0..7a32b5f 100644
--- a/util/mac/mac_util.h
+++ b/util/mac/mac_util.h
@@ -65,7 +65,6 @@
                             int* minor,
                             int* bugfix,
                             std::string* build,
-                            bool* server,
                             std::string* version_string);
 
 //! \brief Returns the model name and board ID of the running system.
diff --git a/util/mac/mac_util_test.mm b/util/mac/mac_util_test.mm
index 49ee090..c086ac6 100644
--- a/util/mac/mac_util_test.mm
+++ b/util/mac/mac_util_test.mm
@@ -65,10 +65,9 @@
   int minor;
   int bugfix;
   std::string build;
-  bool server;
   std::string version_string;
-  ASSERT_TRUE(MacOSVersionComponents(
-      &major, &minor, &bugfix, &build, &server, &version_string));
+  ASSERT_TRUE(
+      MacOSVersionComponents(&major, &minor, &bugfix, &build, &version_string));
 
   EXPECT_GE(major, 10);
   EXPECT_LE(major, 99);
@@ -116,10 +115,9 @@
   int minor;
   int bugfix;
   std::string build;
-  bool server;
   std::string version_string;
-  ASSERT_TRUE(MacOSVersionComponents(
-      &major, &minor, &bugfix, &build, &server, &version_string));
+  ASSERT_TRUE(
+      MacOSVersionComponents(&major, &minor, &bugfix, &build, &version_string));
 
   EXPECT_EQ(macos_version_number,
             major * 1'00'00 + minor * 1'00 +