Delete unused MacOS code related to ERRCTX_OSSTATUS
Bug: webrtc:6424 Change-Id: I3f98d31677201fcc52e492a463945fb9f6f2e883 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138831 Reviewed-by: Kári Helgason <kthelgason@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Commit-Queue: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#28231}
This commit is contained in:
parent
28aced5c3c
commit
171bd2644d
@ -303,7 +303,7 @@ rtc_source_set("logging") {
|
||||
deps += [ "system:inline" ]
|
||||
|
||||
if (is_mac) {
|
||||
deps += [ ":logging_mac" ]
|
||||
libs += [ "Foundation.framework" ]
|
||||
}
|
||||
|
||||
# logging.h needs the deprecation header while downstream projects are
|
||||
@ -463,17 +463,6 @@ rtc_source_set("deprecation") {
|
||||
]
|
||||
}
|
||||
|
||||
if (is_mac && !build_with_chromium) {
|
||||
rtc_source_set("logging_mac") {
|
||||
visibility = [ ":logging" ]
|
||||
libs = [ "Foundation.framework" ]
|
||||
sources = [
|
||||
"logging_mac.h",
|
||||
"logging_mac.mm",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
rtc_source_set("rtc_task_queue") {
|
||||
visibility = [ "*" ]
|
||||
sources = [
|
||||
|
||||
@ -156,13 +156,6 @@ LogMessage::LogMessage(const char* file,
|
||||
break;
|
||||
}
|
||||
#endif // WEBRTC_WIN
|
||||
#if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
|
||||
case ERRCTX_OSSTATUS: {
|
||||
std::string desc(DescriptionFromOSStatus(err));
|
||||
tmp << " " << (desc.empty() ? "Unknown error" : desc.c_str());
|
||||
break;
|
||||
}
|
||||
#endif // WEBRTC_MAC && !defined(WEBRTC_IOS)
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@ -58,10 +58,6 @@
|
||||
#include "rtc_base/strings/string_builder.h"
|
||||
#include "rtc_base/system/inline.h"
|
||||
|
||||
#if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
|
||||
#include "rtc_base/logging_mac.h"
|
||||
#endif // WEBRTC_MAC
|
||||
|
||||
#if !defined(NDEBUG) || defined(DLOG_ALWAYS_ON)
|
||||
#define RTC_DLOG_IS_ON 1
|
||||
#else
|
||||
@ -97,12 +93,10 @@ enum LogErrorContext {
|
||||
ERRCTX_NONE,
|
||||
ERRCTX_ERRNO, // System-local errno
|
||||
ERRCTX_HRESULT, // Windows HRESULT
|
||||
ERRCTX_OSSTATUS, // MacOS OSStatus
|
||||
|
||||
// Abbreviations for LOG_E macro
|
||||
ERRCTX_EN = ERRCTX_ERRNO, // LOG_E(sev, EN, x)
|
||||
ERRCTX_HR = ERRCTX_HRESULT, // LOG_E(sev, HR, x)
|
||||
ERRCTX_OS = ERRCTX_OSSTATUS, // LOG_E(sev, OS, x)
|
||||
};
|
||||
|
||||
// Virtual sink interface that can receive log messages.
|
||||
|
||||
@ -1,28 +0,0 @@
|
||||
/*
|
||||
* Copyright 2018 The WebRTC Project Authors. All rights reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
#ifndef RTC_BASE_LOGGING_MAC_H_
|
||||
#define RTC_BASE_LOGGING_MAC_H_
|
||||
|
||||
#if !defined(WEBRTC_MAC) || defined(WEBRTC_IOS)
|
||||
#error "Only include this header in macOS builds"
|
||||
#endif
|
||||
|
||||
#include <CoreServices/CoreServices.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace rtc {
|
||||
|
||||
// Returns a UTF8 description from an OS X Status error.
|
||||
std::string DescriptionFromOSStatus(OSStatus err);
|
||||
|
||||
} // namespace rtc
|
||||
|
||||
#endif // RTC_BASE_LOGGING_MAC_H_
|
||||
@ -1,22 +0,0 @@
|
||||
/*
|
||||
* Copyright 2016 The WebRTC Project Authors. All rights reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "rtc_base/logging_mac.h"
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
namespace rtc {
|
||||
std::string DescriptionFromOSStatus(OSStatus err) {
|
||||
NSError* error =
|
||||
[NSError errorWithDomain:NSOSStatusErrorDomain code:err userInfo:nil];
|
||||
return error.description.UTF8String;
|
||||
}
|
||||
|
||||
} // namespace rtc
|
||||
Loading…
x
Reference in New Issue
Block a user