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/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 // MockDispatcher -------------------------------------------------------------- | 23 // MockDispatcher -------------------------------------------------------------- |
24 | 24 |
25 class MockDispatcher : public Dispatcher { | 25 class MockDispatcher : public Dispatcher { |
26 public: | 26 public: |
27 explicit MockDispatcher(CoreTestBase::MockHandleInfo* info) : info_(info) { | 27 explicit MockDispatcher(CoreTestBase::MockHandleInfo* info) : info_(info) { |
28 CHECK(info_); | 28 CHECK(info_); |
29 info_->IncrementCtorCallCount(); | 29 info_->IncrementCtorCallCount(); |
30 } | 30 } |
31 | 31 |
32 // |Dispatcher| private methods: | 32 // |Dispatcher| private methods: |
33 Type GetType() const override { return kTypeUnknown; } | 33 Type GetType() const override { return Type::UNKNOWN; } |
34 | 34 |
35 private: | 35 private: |
36 ~MockDispatcher() override { info_->IncrementDtorCallCount(); } | 36 ~MockDispatcher() override { info_->IncrementDtorCallCount(); } |
37 | 37 |
38 // |Dispatcher| protected methods: | 38 // |Dispatcher| protected methods: |
39 void CloseImplNoLock() override { | 39 void CloseImplNoLock() override { |
40 info_->IncrementCloseCallCount(); | 40 info_->IncrementCloseCallCount(); |
41 lock().AssertAcquired(); | 41 lock().AssertAcquired(); |
42 } | 42 } |
43 | 43 |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 } | 370 } |
371 | 371 |
372 void CoreTestBase_MockHandleInfo::AwakableWasAdded(Awakable* awakable) { | 372 void CoreTestBase_MockHandleInfo::AwakableWasAdded(Awakable* awakable) { |
373 base::AutoLock locker(lock_); | 373 base::AutoLock locker(lock_); |
374 added_awakables_.push_back(awakable); | 374 added_awakables_.push_back(awakable); |
375 } | 375 } |
376 | 376 |
377 } // namespace test | 377 } // namespace test |
378 } // namespace system | 378 } // namespace system |
379 } // namespace mojo | 379 } // namespace mojo |
OLD | NEW |