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

Side by Side Diff: base/bind.h

Issue 2386653002: Replace base::Callback with base::OnceCallback in base::PendingTask (Closed)
Patch Set: revert most of task_scheduler changes Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_BIND_H_ 5 #ifndef BASE_BIND_H_
6 #define BASE_BIND_H_ 6 #define BASE_BIND_H_
7 7
8 #include "base/bind_internal.h" 8 #include "base/bind_internal.h"
9 9
10 // ----------------------------------------------------------------------------- 10 // -----------------------------------------------------------------------------
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 // Unannotated Bind. 74 // Unannotated Bind.
75 // TODO(tzik): Deprecate this and migrate to OnceCallback and 75 // TODO(tzik): Deprecate this and migrate to OnceCallback and
76 // RepeatingCallback, once they get ready. 76 // RepeatingCallback, once they get ready.
77 template <typename Functor, typename... Args> 77 template <typename Functor, typename... Args>
78 inline Callback<MakeUnboundRunType<Functor, Args...>> 78 inline Callback<MakeUnboundRunType<Functor, Args...>>
79 Bind(Functor&& functor, Args&&... args) { 79 Bind(Functor&& functor, Args&&... args) {
80 return internal::BindRepeating(std::forward<Functor>(functor), 80 return internal::BindRepeating(std::forward<Functor>(functor),
81 std::forward<Args>(args)...); 81 std::forward<Args>(args)...);
82 } 82 }
83 83
84 // Converts a OnceClosure to a RepeatingClosure. It hits CHECK failure to run
85 // the resulting RepeatingClosure more than once.
86 BASE_EXPORT internal::RepeatingClosure UnsafeConvertOnceClosureToRepeating(
fdoray 2016/10/06 17:37:22 Do you plan to use OnceClosure instead of Closure
tzik 2016/10/13 05:58:04 Yes, here is a CL to do that, though it's a bit st
87 internal::OnceClosure cb);
88
84 } // namespace base 89 } // namespace base
85 90
86 #endif // BASE_BIND_H_ 91 #endif // BASE_BIND_H_
OLDNEW
« no previous file with comments | « base/BUILD.gn ('k') | base/bind.cc » ('j') | base/debug/task_annotator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698