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

Unified Diff: base/message_loop/message_pump_libevent_unittest.cc

Issue 2801593002: Convert WaitableEvent::EventCallback to OnceCallback (Closed)
Patch Set: test 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
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 0a7c485561682c5923b03376acf9bc345d68e918..59aec5a1cf231cfbabb578ef9d17b8f8c63e06b3 100644
--- a/base/message_loop/message_pump_libevent_unittest.cc
+++ b/base/message_loop/message_pump_libevent_unittest.cc
@@ -256,11 +256,12 @@ TEST_F(MessagePumpLibeventTest, QuitWatcher) {
// Make the IO thread wait for |event| before writing to pipefds[1].
const char buf = 0;
- const WaitableEventWatcher::EventCallback write_fd_task =
- Bind(&WriteFDWrapper, pipefds_[1], &buf, 1);
+ WaitableEventWatcher::EventCallback write_fd_task =
+ BindOnce(&WriteFDWrapper, pipefds_[1], &buf, 1);
io_loop()->task_runner()->PostTask(
- FROM_HERE, BindOnce(IgnoreResult(&WaitableEventWatcher::StartWatching),
- Unretained(watcher.get()), &event, write_fd_task));
+ FROM_HERE,
+ BindOnce(IgnoreResult(&WaitableEventWatcher::StartWatching),
+ Unretained(watcher.get()), &event, std::move(write_fd_task)));
dcheng 2017/04/14 21:56:58 Nit: #include <utility>
tzik 2017/04/17 08:28:33 Done.
// Queue |event| to signal on |loop|.
loop.task_runner()->PostTask(
« no previous file with comments | « no previous file | base/synchronization/waitable_event_watcher.h » ('j') | base/synchronization/waitable_event_watcher_posix.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698