EDK: Make mojo::platform::TaskRunner's PostTask() take an std::function<void()>.
* Keep the version that takes a base::Closure around for now.
* Propagate this to TestIOThread's PostTask()/PostTaskAndWait().
* Convert many things (esp. in tests) to use lambdas instead of
base::Bind.
The following problems remain (preventing the eradication of base::Bind,
base::Callback, etc.):
* You can't (in C++11) move-capture, so instances requiring capture of
move-only types (mostly) remain using base::Bind.
* We're still directly using base::MessageLoop in various places.
R=vardhan@google.com
Review URL: https://codereview.chromium.org/1496663002 .
diff --git a/mojo/edk/system/channel_test_base.cc b/mojo/edk/system/channel_test_base.cc
index 933b5d1..ecbf783 100644
--- a/mojo/edk/system/channel_test_base.cc
+++ b/mojo/edk/system/channel_test_base.cc
@@ -23,7 +23,7 @@
}
void ChannelTestBase::SetUp() {
- PostMethodToIOThreadAndWait(&ChannelTestBase::SetUpOnIOThread);
+ io_thread_.PostTaskAndWait([this]() { SetUpOnIOThread(); });
}
void ChannelTestBase::CreateChannelOnIOThread(unsigned i) {