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

Side by Side Diff: mojo/edk/system/channel_test_base.cc

Issue 1530443005: EDK: Add PlatformHandleWatcher to Channel (and ChannelManager) classes. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years 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 unified diff | Download patch
« no previous file with comments | « mojo/edk/system/channel_manager_unittest.cc ('k') | mojo/edk/system/data_pipe_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/embedder/platform_channel_pair.h"
(...skipping 20 matching lines...) Expand all
31 31
32 CHECK(!channels_[i]); 32 CHECK(!channels_[i]);
33 channels_[i] = MakeRefCounted<Channel>(&platform_support_); 33 channels_[i] = MakeRefCounted<Channel>(&platform_support_);
34 } 34 }
35 35
36 void ChannelTestBase::InitChannelOnIOThread(unsigned i) { 36 void ChannelTestBase::InitChannelOnIOThread(unsigned i) {
37 CHECK(io_thread()->IsCurrentAndRunning()); 37 CHECK(io_thread()->IsCurrentAndRunning());
38 38
39 CHECK(raw_channels_[i]); 39 CHECK(raw_channels_[i]);
40 CHECK(channels_[i]); 40 CHECK(channels_[i]);
41 channels_[i]->Init(std::move(raw_channels_[i])); 41 channels_[i]->Init(io_thread()->task_runner().Clone(),
42 io_thread()->platform_handle_watcher(),
43 std::move(raw_channels_[i]));
42 } 44 }
43 45
44 void ChannelTestBase::CreateAndInitChannelOnIOThread(unsigned i) { 46 void ChannelTestBase::CreateAndInitChannelOnIOThread(unsigned i) {
45 CreateChannelOnIOThread(i); 47 CreateChannelOnIOThread(i);
46 InitChannelOnIOThread(i); 48 InitChannelOnIOThread(i);
47 } 49 }
48 50
49 void ChannelTestBase::ShutdownChannelOnIOThread(unsigned i) { 51 void ChannelTestBase::ShutdownChannelOnIOThread(unsigned i) {
50 CHECK(io_thread()->IsCurrentAndRunning()); 52 CHECK(io_thread()->IsCurrentAndRunning());
51 53
(...skipping 10 matching lines...) Expand all
62 CHECK(io_thread()->IsCurrentAndRunning()); 64 CHECK(io_thread()->IsCurrentAndRunning());
63 65
64 embedder::PlatformChannelPair channel_pair; 66 embedder::PlatformChannelPair channel_pair;
65 raw_channels_[0] = RawChannel::Create(channel_pair.PassServerHandle()); 67 raw_channels_[0] = RawChannel::Create(channel_pair.PassServerHandle());
66 raw_channels_[1] = RawChannel::Create(channel_pair.PassClientHandle()); 68 raw_channels_[1] = RawChannel::Create(channel_pair.PassClientHandle());
67 } 69 }
68 70
69 } // namespace test 71 } // namespace test
70 } // namespace system 72 } // namespace system
71 } // namespace mojo 73 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/channel_manager_unittest.cc ('k') | mojo/edk/system/data_pipe_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698