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

Unified Diff: base/message_loop/message_pump_libevent_unittest.cc

Issue 2801593002: Convert WaitableEvent::EventCallback to OnceCallback (Closed)
Patch Set: +#include <utility> 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 | « no previous file | base/synchronization/waitable_event_watcher.h » ('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 0a7c485561682c5923b03376acf9bc345d68e918..89c4e1f53f5df64266a6c35533d63ba3fe159b88 100644
--- a/base/message_loop/message_pump_libevent_unittest.cc
+++ b/base/message_loop/message_pump_libevent_unittest.cc
@@ -7,6 +7,7 @@
#include <unistd.h>
#include <memory>
+#include <utility>
#include "base/bind.h"
#include "base/bind_helpers.h"
@@ -256,11 +257,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)));
// 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698