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

Unified Diff: base/synchronization/atomic_flag_unittest.cc

Issue 2791243002: Rewrite base::Bind into base::BindOnce on trivial cases in base (Closed)
Patch Set: rebase Created 3 years, 8 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 | « base/sequenced_task_runner_unittest.cc ('k') | base/synchronization/condition_variable_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/synchronization/atomic_flag_unittest.cc
diff --git a/base/synchronization/atomic_flag_unittest.cc b/base/synchronization/atomic_flag_unittest.cc
index a3aa3341a0d1ef500a414335e41e97dd7f2470d7..76e5d968f78b91471bf85227e667f46b1aa18d99 100644
--- a/base/synchronization/atomic_flag_unittest.cc
+++ b/base/synchronization/atomic_flag_unittest.cc
@@ -68,10 +68,9 @@ TEST(AtomicFlagTest, ReadFromDifferentThread) {
Thread thread("AtomicFlagTest.ReadFromDifferentThread");
ASSERT_TRUE(thread.Start());
- thread.task_runner()->PostTask(
- FROM_HERE,
- Bind(&BusyWaitUntilFlagIsSet, &tested_flag, &expected_after_flag,
- &reset_flag));
+ thread.task_runner()->PostTask(FROM_HERE,
+ BindOnce(&BusyWaitUntilFlagIsSet, &tested_flag,
+ &expected_after_flag, &reset_flag));
// To verify that IsSet() fetches the flag's value from memory every time it
// is called (not just the first time that it is called on a thread), sleep
@@ -100,10 +99,9 @@ TEST(AtomicFlagTest, ReadFromDifferentThread) {
// |thread| is guaranteed to be synchronized past the
// |UnsafeResetForTesting()| call when the task runs per the implicit
// synchronization in the post task mechanism.
- thread.task_runner()->PostTask(
- FROM_HERE,
- Bind(&BusyWaitUntilFlagIsSet, &tested_flag, &expected_after_flag,
- nullptr));
+ thread.task_runner()->PostTask(FROM_HERE,
+ BindOnce(&BusyWaitUntilFlagIsSet, &tested_flag,
+ &expected_after_flag, nullptr));
PlatformThread::Sleep(TimeDelta::FromMilliseconds(20));
@@ -125,7 +123,7 @@ TEST(AtomicFlagTest, SetOnDifferentSequenceDeathTest) {
AtomicFlag flag;
flag.Set();
- t.task_runner()->PostTask(FROM_HERE, Bind(&ExpectSetFlagDeath, &flag));
+ t.task_runner()->PostTask(FROM_HERE, BindOnce(&ExpectSetFlagDeath, &flag));
}
} // namespace base
« no previous file with comments | « base/sequenced_task_runner_unittest.cc ('k') | base/synchronization/condition_variable_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698