OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/system/message_pipe_test_utils.h" | 5 #include "mojo/system/message_pipe_test_utils.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/threading/platform_thread.h" // For |Sleep()|. | 8 #include "base/threading/platform_thread.h" // For |Sleep()|. |
9 #include "mojo/system/waiter.h" | 9 #include "mojo/system/waiter.h" |
10 | 10 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 CHECK(channel_->RunMessagePipeEndpoint(Channel::kBootstrapEndpointId, | 87 CHECK(channel_->RunMessagePipeEndpoint(Channel::kBootstrapEndpointId, |
88 Channel::kBootstrapEndpointId)); | 88 Channel::kBootstrapEndpointId)); |
89 } | 89 } |
90 | 90 |
91 void ChannelThread::ShutdownChannelOnIOThread() { | 91 void ChannelThread::ShutdownChannelOnIOThread() { |
92 CHECK(channel_.get()); | 92 CHECK(channel_.get()); |
93 channel_->Shutdown(); | 93 channel_->Shutdown(); |
94 channel_ = NULL; | 94 channel_ = NULL; |
95 } | 95 } |
96 | 96 |
| 97 #if !defined(OS_IOS) |
97 MultiprocessMessagePipeTestBase::MultiprocessMessagePipeTestBase() | 98 MultiprocessMessagePipeTestBase::MultiprocessMessagePipeTestBase() |
98 : channel_thread_(&platform_support_) { | 99 : channel_thread_(&platform_support_) { |
99 } | 100 } |
100 | 101 |
101 MultiprocessMessagePipeTestBase::~MultiprocessMessagePipeTestBase() { | 102 MultiprocessMessagePipeTestBase::~MultiprocessMessagePipeTestBase() { |
102 } | 103 } |
103 | 104 |
104 void MultiprocessMessagePipeTestBase::Init(scoped_refptr<MessagePipe> mp) { | 105 void MultiprocessMessagePipeTestBase::Init(scoped_refptr<MessagePipe> mp) { |
105 channel_thread_.Start(helper_.server_platform_handle.Pass(), mp); | 106 channel_thread_.Start(helper_.server_platform_handle.Pass(), mp); |
106 } | 107 } |
| 108 #endif |
107 | 109 |
108 } // namespace test | 110 } // namespace test |
109 } // namespace system | 111 } // namespace system |
110 } // namespace mojo | 112 } // namespace mojo |
OLD | NEW |