Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(363)

Unified Diff: webrtc/base/logging_mac.mm

Issue 1921463002: Replace use of GetMacOSStatusErrorString (deprecated) with use of NSOSStatusErrorDomain. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix guard Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« webrtc/base/base.gyp ('K') | « webrtc/base/logging.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/logging_mac.mm
diff --git a/webrtc/base/scoped_autorelease_pool.mm b/webrtc/base/logging_mac.mm
similarity index 59%
copy from webrtc/base/scoped_autorelease_pool.mm
copy to webrtc/base/logging_mac.mm
index 4176aad0e9cda5016da93017185b163bcfe7ec0e..ffee3541a48245e0179670ce2b013f957bc6b88a 100644
--- a/webrtc/base/scoped_autorelease_pool.mm
+++ b/webrtc/base/logging_mac.mm
@@ -1,5 +1,5 @@
/*
- * Copyright 2008 The WebRTC Project Authors. All rights reserved.
+ * 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
@@ -8,18 +8,15 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "webrtc/base/logging.h"
+
#import <Foundation/Foundation.h>
-#import "webrtc/base/scoped_autorelease_pool.h"
namespace rtc {
-
-ScopedAutoreleasePool::ScopedAutoreleasePool() {
- pool_ = [[NSAutoreleasePool alloc] init];
+std::string DescriptionFromOSStatus(OSStatus err) {
+ NSError* error =
+ [NSError errorWithDomain:NSOSStatusErrorDomain code:err userInfo:nil];
+ return error.description.UTF8String;
}
-
-ScopedAutoreleasePool::~ScopedAutoreleasePool() {
- [pool_ drain];
-}
-
} // namespace rtc
« webrtc/base/base.gyp ('K') | « webrtc/base/logging.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698