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

Unified Diff: base/threading/thread_perftest.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/threading/thread.cc ('k') | base/threading/thread_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/threading/thread_perftest.cc
diff --git a/base/threading/thread_perftest.cc b/base/threading/thread_perftest.cc
index ef4e8f7158a9e689ad000ebe789f07a369f6d249..32b4289673c1926042135e98227eaad65c7f8e26 100644
--- a/base/threading/thread_perftest.cc
+++ b/base/threading/thread_perftest.cc
@@ -67,8 +67,8 @@ class ThreadPerfTest : public testing::Test {
WaitableEvent::InitialState::NOT_SIGNALED);
base::ThreadTicks ticks;
thread.task_runner()->PostTask(
- FROM_HERE, base::Bind(&ThreadPerfTest::TimeOnThread,
- base::Unretained(this), &ticks, &done));
+ FROM_HERE, base::BindOnce(&ThreadPerfTest::TimeOnThread,
+ base::Unretained(this), &ticks, &done));
done.Wait();
return ticks;
}
@@ -138,8 +138,8 @@ class TaskPerfTest : public ThreadPerfTest {
return;
}
NextThread(hops)->task_runner()->PostTask(
- FROM_HERE, base::Bind(&ThreadPerfTest::PingPong, base::Unretained(this),
- hops - 1));
+ FROM_HERE, base::BindOnce(&ThreadPerfTest::PingPong,
+ base::Unretained(this), hops - 1));
}
};
@@ -210,8 +210,8 @@ class EventPerfTest : public ThreadPerfTest {
remaining_hops_ = hops;
for (size_t i = 0; i < threads_.size(); i++) {
threads_[i]->task_runner()->PostTask(
- FROM_HERE, base::Bind(&EventPerfTest::WaitAndSignalOnThread,
- base::Unretained(this), i));
+ FROM_HERE, base::BindOnce(&EventPerfTest::WaitAndSignalOnThread,
+ base::Unretained(this), i));
}
// Kick off the Signal ping-ponging.
« no previous file with comments | « base/threading/thread.cc ('k') | base/threading/thread_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698