mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 22:26:06 +00:00
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: Ia9063be2e55a48e45d9f9974ac2e51bac004f37d Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4584570 Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
parent
1fdbd3736c
commit
788b72f922
@ -86,7 +86,6 @@ SystemSnapshotMac::SystemSnapshotMac()
|
||||
os_version_major_(0),
|
||||
os_version_minor_(0),
|
||||
os_version_bugfix_(0),
|
||||
os_server_(false),
|
||||
initialized_() {
|
||||
}
|
||||
|
||||
@ -107,7 +106,6 @@ void SystemSnapshotMac::Initialize(ProcessReaderMac* process_reader,
|
||||
&os_version_minor_,
|
||||
&os_version_bugfix_,
|
||||
&os_version_build_,
|
||||
&os_server_,
|
||||
&os_version_string);
|
||||
|
||||
std::string uname_string;
|
||||
@ -304,7 +302,7 @@ SystemSnapshot::OperatingSystem SystemSnapshotMac::GetOperatingSystem() const {
|
||||
|
||||
bool SystemSnapshotMac::OSServer() const {
|
||||
INITIALIZATION_STATE_DCHECK_VALID(initialized_);
|
||||
return os_server_;
|
||||
return false;
|
||||
}
|
||||
|
||||
void SystemSnapshotMac::OSVersion(int* major,
|
||||
|
@ -93,7 +93,6 @@ class SystemSnapshotMac final : public SystemSnapshot {
|
||||
int os_version_major_;
|
||||
int os_version_minor_;
|
||||
int os_version_bugfix_;
|
||||
bool os_server_;
|
||||
InitializationStateDcheck initialized_;
|
||||
};
|
||||
|
||||
|
@ -45,7 +45,6 @@ extern "C" {
|
||||
// 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 DarwinMajorVersion() {
|
||||
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 @@ CFDictionaryRef TryCFCopySystemVersionDictionary() {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CFDictionaryRef TryCFCopyServerVersionDictionary() {
|
||||
if (_CFCopyServerVersionDictionary) {
|
||||
return _CFCopyServerVersionDictionary();
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const void* TryCFDictionaryGetValue(CFDictionaryRef dictionary,
|
||||
const void* value) {
|
||||
if (value) {
|
||||
@ -242,19 +234,12 @@ bool MacOSVersionComponents(int* major,
|
||||
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 @@ void MacModelAndBoard(std::string* model, std::string* board_id) {
|
||||
// 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();
|
||||
|
@ -65,7 +65,6 @@ bool MacOSVersionComponents(int* major,
|
||||
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.
|
||||
|
@ -65,10 +65,9 @@ TEST(MacUtil, MacOSVersionComponents) {
|
||||
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 @@ TEST(MacUtil, MacOSVersionNumber) {
|
||||
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 +
|
||||
|
Loading…
x
Reference in New Issue
Block a user