| Index: mojo/edk/system/remote_data_pipe_impl_unittest.cc
|
| diff --git a/mojo/edk/system/remote_data_pipe_impl_unittest.cc b/mojo/edk/system/remote_data_pipe_impl_unittest.cc
|
| index c1e746fbe3ec194641b8dcd5c4645f758cdab83a..bde5087a8357511d07e192383ec6960e11bdb01e 100644
|
| --- a/mojo/edk/system/remote_data_pipe_impl_unittest.cc
|
| +++ b/mojo/edk/system/remote_data_pipe_impl_unittest.cc
|
| @@ -9,7 +9,6 @@
|
|
|
| #include <utility>
|
|
|
| -#include "base/bind.h"
|
| #include "base/logging.h"
|
| #include "mojo/edk/embedder/platform_channel_pair.h"
|
| #include "mojo/edk/embedder/simple_platform_support.h"
|
| @@ -49,16 +48,14 @@ class RemoteDataPipeImplTest : public testing::Test {
|
| message_pipes_[0] = MessagePipe::CreateLocalProxy(&ep[0]);
|
| message_pipes_[1] = MessagePipe::CreateLocalProxy(&ep[1]);
|
|
|
| - io_thread_.PostTaskAndWait(base::Bind(
|
| - &RemoteDataPipeImplTest::SetUpOnIOThread, base::Unretained(this),
|
| - base::Passed(&ep[0]), base::Passed(&ep[1])));
|
| + io_thread_.PostTaskAndWait(
|
| + [this, &ep]() { SetUpOnIOThread(std::move(ep[0]), std::move(ep[1])); });
|
| }
|
|
|
| void TearDown() override {
|
| EnsureMessagePipeClosed(0);
|
| EnsureMessagePipeClosed(1);
|
| - io_thread_.PostTaskAndWait(base::Bind(
|
| - &RemoteDataPipeImplTest::TearDownOnIOThread, base::Unretained(this)));
|
| + io_thread_.PostTaskAndWait([this]() { TearDownOnIOThread(); });
|
| }
|
|
|
| protected:
|
| @@ -86,10 +83,8 @@ class RemoteDataPipeImplTest : public testing::Test {
|
| }
|
|
|
| private:
|
| - // TODO(vtl): The arguments should be rvalue references, but that doesn't
|
| - // currently work correctly with base::Bind.
|
| - void SetUpOnIOThread(RefPtr<ChannelEndpoint> ep0,
|
| - RefPtr<ChannelEndpoint> ep1) {
|
| + void SetUpOnIOThread(RefPtr<ChannelEndpoint>&& ep0,
|
| + RefPtr<ChannelEndpoint>&& ep1) {
|
| CHECK(io_thread_.IsCurrentAndRunning());
|
|
|
| embedder::PlatformChannelPair channel_pair;
|
|
|