| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "mojo/edk/system/channel_test_base.h" | 5 #include "mojo/edk/system/channel_test_base.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "mojo/edk/embedder/platform_channel_pair.h" | 10 #include "mojo/edk/platform/platform_pipe.h" |
| 11 #include "mojo/edk/system/raw_channel.h" | 11 #include "mojo/edk/system/raw_channel.h" |
| 12 | 12 |
| 13 using mojo::platform::PlatformPipe; |
| 13 using mojo::util::MakeRefCounted; | 14 using mojo::util::MakeRefCounted; |
| 14 | 15 |
| 15 namespace mojo { | 16 namespace mojo { |
| 16 namespace system { | 17 namespace system { |
| 17 namespace test { | 18 namespace test { |
| 18 | 19 |
| 19 ChannelTestBase::ChannelTestBase() | 20 ChannelTestBase::ChannelTestBase() |
| 20 : io_thread_(TestIOThread::StartMode::AUTO) {} | 21 : io_thread_(TestIOThread::StartMode::AUTO) {} |
| 21 | 22 |
| 22 ChannelTestBase::~ChannelTestBase() { | 23 ChannelTestBase::~ChannelTestBase() { |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 } | 57 } |
| 57 | 58 |
| 58 void ChannelTestBase::ShutdownAndReleaseChannelOnIOThread(unsigned i) { | 59 void ChannelTestBase::ShutdownAndReleaseChannelOnIOThread(unsigned i) { |
| 59 ShutdownChannelOnIOThread(i); | 60 ShutdownChannelOnIOThread(i); |
| 60 channels_[i] = nullptr; | 61 channels_[i] = nullptr; |
| 61 } | 62 } |
| 62 | 63 |
| 63 void ChannelTestBase::SetUpOnIOThread() { | 64 void ChannelTestBase::SetUpOnIOThread() { |
| 64 CHECK(io_thread()->IsCurrentAndRunning()); | 65 CHECK(io_thread()->IsCurrentAndRunning()); |
| 65 | 66 |
| 66 embedder::PlatformChannelPair channel_pair; | 67 PlatformPipe channel_pair; |
| 67 raw_channels_[0] = RawChannel::Create(channel_pair.handle0.Pass()); | 68 raw_channels_[0] = RawChannel::Create(channel_pair.handle0.Pass()); |
| 68 raw_channels_[1] = RawChannel::Create(channel_pair.handle1.Pass()); | 69 raw_channels_[1] = RawChannel::Create(channel_pair.handle1.Pass()); |
| 69 } | 70 } |
| 70 | 71 |
| 71 } // namespace test | 72 } // namespace test |
| 72 } // namespace system | 73 } // namespace system |
| 73 } // namespace mojo | 74 } // namespace mojo |
| OLD | NEW |