| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 } | 47 } |
| 48 | 48 |
| 49 ~MockDispatcher() override { info_->IncrementDtorCallCount(); } | 49 ~MockDispatcher() override { info_->IncrementDtorCallCount(); } |
| 50 | 50 |
| 51 // |Dispatcher| protected methods: | 51 // |Dispatcher| protected methods: |
| 52 void CloseImplNoLock() override { | 52 void CloseImplNoLock() override { |
| 53 info_->IncrementCloseCallCount(); | 53 info_->IncrementCloseCallCount(); |
| 54 mutex().AssertHeld(); | 54 mutex().AssertHeld(); |
| 55 } | 55 } |
| 56 | 56 |
| 57 MojoResult WriteMessageImplNoLock( | 57 MojoResult WriteMessageImplNoLock(UserPointer<const void> bytes, |
| 58 UserPointer<const void> bytes, | 58 uint32_t num_bytes, |
| 59 uint32_t num_bytes, | 59 std::vector<HandleTransport>* transports, |
| 60 std::vector<DispatcherTransport>* transports, | 60 MojoWriteMessageFlags /*flags*/) override { |
| 61 MojoWriteMessageFlags /*flags*/) override { | |
| 62 info_->IncrementWriteMessageCallCount(); | 61 info_->IncrementWriteMessageCallCount(); |
| 63 mutex().AssertHeld(); | 62 mutex().AssertHeld(); |
| 64 | 63 |
| 65 if (num_bytes > GetConfiguration().max_message_num_bytes) | 64 if (num_bytes > GetConfiguration().max_message_num_bytes) |
| 66 return MOJO_RESULT_RESOURCE_EXHAUSTED; | 65 return MOJO_RESULT_RESOURCE_EXHAUSTED; |
| 67 | 66 |
| 68 if (transports) | 67 if (transports) |
| 69 return MOJO_RESULT_UNIMPLEMENTED; | 68 return MOJO_RESULT_UNIMPLEMENTED; |
| 70 | 69 |
| 71 return MOJO_RESULT_OK; | 70 return MOJO_RESULT_OK; |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 } | 427 } |
| 429 | 428 |
| 430 void CoreTestBase_MockHandleInfo::AwakableWasAdded(Awakable* awakable) { | 429 void CoreTestBase_MockHandleInfo::AwakableWasAdded(Awakable* awakable) { |
| 431 MutexLocker locker(&mutex_); | 430 MutexLocker locker(&mutex_); |
| 432 added_awakables_.push_back(awakable); | 431 added_awakables_.push_back(awakable); |
| 433 } | 432 } |
| 434 | 433 |
| 435 } // namespace test | 434 } // namespace test |
| 436 } // namespace system | 435 } // namespace system |
| 437 } // namespace mojo | 436 } // namespace mojo |
| OLD | NEW |