1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #import "base/mac/bind_objc_block.h"
8 #include "base/memory/scoped_nsobject.h"
12 // Run the block contained in the parameter.
13 void RunBlock(scoped_nsobject<id> block) {
14 void(^extracted_block)() = block.get();
22 base::Closure BindBlock(void(^block)()) {
23 return base::Bind(&RunBlock, scoped_nsobject<id>([block copy]));