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

Unified Diff: docs/callback.md

Issue 2735903002: Fix OnceCallback example in docs/callback.md (Closed)
Patch Set: BindOnce Created 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: docs/callback.md
diff --git a/docs/callback.md b/docs/callback.md
index b891a0f05fdf21178a4e4c8ff918fecc1c8995f9..6b7dd6931f5009a402696c7753c619a48ff98b62 100644
--- a/docs/callback.md
+++ b/docs/callback.md
@@ -67,8 +67,11 @@ void Baz(OnceCallback<void(int)> cb) {
// |Qux| takes the ownership of |cb| and transfers ownership to PostTask(),
// which also takes the ownership of |cb|.
+// NOTE: TaskRunner is not actually migrated to OnceClosure yet. Once TaskRunner
+// supports OnceClosure, a OnceCallback can be posted as follows:
void Qux(OnceCallback<void(int)> cb) {
- PostTask(FROM_HERE, std::move(cb));
+ PostTask(FROM_HERE,
+ base::BindOnce(std::move(cb), 42)); // not yet implemented!
}
```
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698