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

Unified Diff: base/message_loop/message_pump_libevent_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/message_loop/message_pump_glib_unittest.cc ('k') | base/message_loop/message_pump_perftest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop/message_pump_libevent_unittest.cc
diff --git a/base/message_loop/message_pump_libevent_unittest.cc b/base/message_loop/message_pump_libevent_unittest.cc
index 3e7a200a2352a9a9ea37a6347f84b95781a2bbce..0a7c485561682c5923b03376acf9bc345d68e918 100644
--- a/base/message_loop/message_pump_libevent_unittest.cc
+++ b/base/message_loop/message_pump_libevent_unittest.cc
@@ -187,7 +187,7 @@ class NestedPumpWatcher : public MessagePumpLibevent::Watcher {
void OnFileCanReadWithoutBlocking(int /* fd */) override {
RunLoop runloop;
ThreadTaskRunnerHandle::Get()->PostTask(
- FROM_HERE, Bind(&QuitMessageLoopAndStart, runloop.QuitClosure()));
+ FROM_HERE, BindOnce(&QuitMessageLoopAndStart, runloop.QuitClosure()));
runloop.Run();
}
@@ -218,7 +218,7 @@ class QuitWatcher : public BaseWatcher {
void OnFileCanReadWithoutBlocking(int /* fd */) override {
// Post a fatal closure to the MessageLoop before we quit it.
- ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, Bind(&FatalClosure));
+ ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, BindOnce(&FatalClosure));
// Now quit the MessageLoop.
run_loop_->Quit();
@@ -259,12 +259,12 @@ TEST_F(MessagePumpLibeventTest, QuitWatcher) {
const WaitableEventWatcher::EventCallback write_fd_task =
Bind(&WriteFDWrapper, pipefds_[1], &buf, 1);
io_loop()->task_runner()->PostTask(
- FROM_HERE, Bind(IgnoreResult(&WaitableEventWatcher::StartWatching),
- Unretained(watcher.get()), &event, write_fd_task));
+ FROM_HERE, BindOnce(IgnoreResult(&WaitableEventWatcher::StartWatching),
+ Unretained(watcher.get()), &event, write_fd_task));
// Queue |event| to signal on |loop|.
loop.task_runner()->PostTask(
- FROM_HERE, Bind(&WaitableEvent::Signal, Unretained(&event)));
+ FROM_HERE, BindOnce(&WaitableEvent::Signal, Unretained(&event)));
// Now run the MessageLoop.
run_loop.Run();
@@ -272,7 +272,7 @@ TEST_F(MessagePumpLibeventTest, QuitWatcher) {
// StartWatching can move |watcher| to IO thread. Release on IO thread.
io_loop()->task_runner()->PostTask(
FROM_HERE,
- Bind(&WaitableEventWatcher::StopWatching, Owned(watcher.release())));
+ BindOnce(&WaitableEventWatcher::StopWatching, Owned(watcher.release())));
}
} // namespace
« no previous file with comments | « base/message_loop/message_pump_glib_unittest.cc ('k') | base/message_loop/message_pump_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698