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

Unified Diff: base/bind.h

Issue 2386653002: Replace base::Callback with base::OnceCallback in base::PendingTask (Closed)
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
Index: base/bind.h
diff --git a/base/bind.h b/base/bind.h
index ce717972e26cde23941d545ef5e3f8832309466e..54209bfab879def0c09224db03109d21fa7b9329 100644
--- a/base/bind.h
+++ b/base/bind.h
@@ -78,6 +78,13 @@ Bind(Functor&& functor, Args&&... args) {
std::forward<Args>(args)...);
}
+// Converts a OnceClosure to a RepeatingClosure. It hits CHECK failure to run
+// the resulting RepeatingClosure more than once.
+// TODO(tzik): This will be unneeded after the Closure-to-OnceClosure migration
+// on TaskRunner. Remove it once it gets unneeded.
+BASE_EXPORT RepeatingClosure UnsafeConvertOnceClosureToRepeating(
+ OnceClosure cb);
+
} // namespace base
#endif // BASE_BIND_H_

Powered by Google App Engine
This is Rietveld 408576698