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

Unified Diff: base/threading/thread.cc

Issue 2791243002: Rewrite base::Bind into base::BindOnce on trivial cases in base (Closed)
Patch Set: 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
Index: base/threading/thread.cc
diff --git a/base/threading/thread.cc b/base/threading/thread.cc
index 0aeed2a9e4b5ac2c2a5e7bac1929e881b827361c..75c911b7f87dced1d2b9695a86af4f8efc2f1aff 100644
--- a/base/threading/thread.cc
+++ b/base/threading/thread.cc
@@ -156,7 +156,7 @@ void Thread::FlushForTesting() {
WaitableEvent done(WaitableEvent::ResetPolicy::AUTOMATIC,
WaitableEvent::InitialState::NOT_SIGNALED);
task_runner()->PostTask(FROM_HERE,
- Bind(&WaitableEvent::Signal, Unretained(&done)));
+ BindOnce(&WaitableEvent::Signal, Unretained(&done)));
done.Wait();
}
@@ -210,7 +210,7 @@ void Thread::StopSoon() {
}
task_runner()->PostTask(
- FROM_HERE, base::Bind(&Thread::ThreadQuitHelper, Unretained(this)));
+ FROM_HERE, base::BindOnce(&Thread::ThreadQuitHelper, Unretained(this)));
}
void Thread::DetachFromSequence() {

Powered by Google App Engine
This is Rietveld 408576698