OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/core_test_base.h" | 5 #include "mojo/edk/system/core_test_base.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "mojo/edk/embedder/simple_platform_support.h" | 10 #include "mojo/edk/embedder/simple_platform_support.h" |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 mutex().AssertHeld(); | 184 mutex().AssertHeld(); |
185 if (signals_state) | 185 if (signals_state) |
186 *signals_state = HandleSignalsState(); | 186 *signals_state = HandleSignalsState(); |
187 } | 187 } |
188 | 188 |
189 void CancelAllAwakablesNoLock() override { | 189 void CancelAllAwakablesNoLock() override { |
190 info_->IncrementCancelAllAwakablesCallCount(); | 190 info_->IncrementCancelAllAwakablesCallCount(); |
191 mutex().AssertHeld(); | 191 mutex().AssertHeld(); |
192 } | 192 } |
193 | 193 |
194 RefPtr<Dispatcher> CreateEquivalentDispatcherAndCloseImplNoLock() override { | 194 RefPtr<Dispatcher> CreateEquivalentDispatcherAndCloseImplNoLock( |
| 195 MessagePipe* /*message_pipe*/, |
| 196 unsigned /*port*/) override { |
| 197 CancelAllAwakablesNoLock(); |
195 return Create(info_); | 198 return Create(info_); |
196 } | 199 } |
197 | 200 |
198 CoreTestBase::MockHandleInfo* const info_; | 201 CoreTestBase::MockHandleInfo* const info_; |
199 | 202 |
200 MOJO_DISALLOW_COPY_AND_ASSIGN(MockDispatcher); | 203 MOJO_DISALLOW_COPY_AND_ASSIGN(MockDispatcher); |
201 }; | 204 }; |
202 | 205 |
203 } // namespace | 206 } // namespace |
204 | 207 |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 } | 428 } |
426 | 429 |
427 void CoreTestBase_MockHandleInfo::AwakableWasAdded(Awakable* awakable) { | 430 void CoreTestBase_MockHandleInfo::AwakableWasAdded(Awakable* awakable) { |
428 MutexLocker locker(&mutex_); | 431 MutexLocker locker(&mutex_); |
429 added_awakables_.push_back(awakable); | 432 added_awakables_.push_back(awakable); |
430 } | 433 } |
431 | 434 |
432 } // namespace test | 435 } // namespace test |
433 } // namespace system | 436 } // namespace system |
434 } // namespace mojo | 437 } // namespace mojo |
OLD | NEW |