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

Unified Diff: base/mac/scoped_nsobject.mm

Issue 1855483004: [iOS/OS X] Allow base::scoped_nsobject<> to be used when ARC is enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing copy constructor from scoped_nsobject<subclass> to scoped_nsobject<class> Created 4 years, 6 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
« no previous file with comments | « base/mac/scoped_nsobject.h ('k') | base/mac/scoped_nsobject_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/mac/scoped_nsobject.mm
diff --git a/base/mac/scoped_nsobject.mm b/base/mac/scoped_nsobject.mm
new file mode 100644
index 0000000000000000000000000000000000000000..65b40317dc716338bc1341a6f38225dd58689ab1
--- /dev/null
+++ b/base/mac/scoped_nsobject.mm
@@ -0,0 +1,23 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#import "base/mac/scoped_nsobject.h"
+
+namespace base {
+namespace internal {
+
+id ScopedNSProtocolTraitsRetain(id obj) {
+ return [obj retain];
+}
+
+id ScopedNSProtocolTraitsAutoRelease(id obj) {
+ return [obj autorelease];
+}
+
+void ScopedNSProtocolTraitsRelease(id obj) {
+ return [obj release];
+}
+
+} // namespace internal
+} // namespace base
« no previous file with comments | « base/mac/scoped_nsobject.h ('k') | base/mac/scoped_nsobject_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698