1 // Copyright 2018 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. 4 5 #include "callback.h" 6 Foo(base::OnceClosure)7void Foo(base::OnceClosure) {} 8 Bar(int,base::OnceClosure,int)9void Bar(int, base::OnceClosure, int) {} 10 Test()11void Test() { 12 base::OnceClosure cb = base::AdaptCallbackForRepeating(base::BindOnce([] {})); 13 Foo(base::AdaptCallbackForRepeating(base::BindOnce([] {}))); 14 Bar(1, base::AdaptCallbackForRepeating(base::BindOnce([] {})), 1); 15 16 using namespace base; 17 18 OnceClosure cb2 = AdaptCallbackForRepeating(BindOnce([] {})); 19 Foo(AdaptCallbackForRepeating(BindOnce([] {}))); 20 Bar(1, AdaptCallbackForRepeating(BindOnce([] {})), 1); 21 22 OnceClosure cb3 = BindOnce([] {}); 23 } 24