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

Unified Diff: base/mac/scoped_block.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: Revert changes to build/config/compiler/BUILD.gn Created 4 years, 9 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
Index: base/mac/scoped_block.mm
diff --git a/base/mac/scoped_block.mm b/base/mac/scoped_block.mm
new file mode 100644
index 0000000000000000000000000000000000000000..c8d7e66bd0e69a56d326f3bc31ca184715ebb246
--- /dev/null
+++ b/base/mac/scoped_block.mm
@@ -0,0 +1,20 @@
+// 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_block.h"
+
Nico 2016/04/04 17:53:44 Is the idea that we'll have this file around in no
+namespace base {
+namespace mac {
+namespace internal {
+
+id ScopedBlockTraitsRetain(id block) {
+ return Block_copy(block);
+}
+void ScopedBlockTraitsRelease(id block) {
Mark Mentovai 2016/04/05 00:09:15 nit: Blank line between functions.
+ Block_release(block);
+}
+
+} // namespace internal
+} // namespace mac
+} // namespace base

Powered by Google App Engine
This is Rietveld 408576698