Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 #ifndef SERVICES_RESOURCE_COORDINATOR_COORDINATION_UNIT_COORDINATION_UNIT_IMPL_U NITTEST_UTIL_H_ | 5 #ifndef SERVICES_RESOURCE_COORDINATOR_COORDINATION_UNIT_COORDINATION_UNIT_IMPL_U NITTEST_UTIL_H_ |
| 6 #define SERVICES_RESOURCE_COORDINATOR_COORDINATION_UNIT_COORDINATION_UNIT_IMPL_U NITTEST_UTIL_H_ | 6 #define SERVICES_RESOURCE_COORDINATOR_COORDINATION_UNIT_COORDINATION_UNIT_IMPL_U NITTEST_UTIL_H_ |
| 7 | 7 |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "services/resource_coordinator/coordination_unit/coordination_unit_mana ger.h" | |
| 9 #include "services/resource_coordinator/coordination_unit/coordination_unit_prov ider_impl.h" | 10 #include "services/resource_coordinator/coordination_unit/coordination_unit_prov ider_impl.h" |
| 10 #include "services/service_manager/public/cpp/service_context_ref.h" | 11 #include "services/service_manager/public/cpp/service_context_ref.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 12 | 13 |
| 13 namespace resource_coordinator { | 14 namespace resource_coordinator { |
| 14 | 15 |
| 15 class CoordinationUnitImplTestBase : public testing::Test { | 16 class CoordinationUnitImplTestBase : public testing::Test { |
| 16 public: | 17 public: |
| 17 CoordinationUnitImplTestBase(); | 18 CoordinationUnitImplTestBase(); |
| 18 ~CoordinationUnitImplTestBase() override; | 19 ~CoordinationUnitImplTestBase() override; |
| 19 | 20 |
| 20 // testing::Test: | 21 // testing::Test: |
| 21 void TearDown() override; | 22 void TearDown() override; |
| 22 | 23 |
| 23 protected: | 24 protected: |
| 24 service_manager::ServiceContextRefFactory* service_context_ref_factory() { | 25 service_manager::ServiceContextRefFactory* service_context_ref_factory() { |
| 25 return &service_ref_factory_; | 26 return &service_ref_factory_; |
| 26 } | 27 } |
| 28 CoordinationUnitManager* coordination_unit_manager() { | |
| 29 return &coordination_unit_manager_; | |
|
oystein (OOO til 10th of July)
2017/06/20 18:39:24
Just return a ref?
matthalp
2017/06/20 19:02:52
Agreed -- Done.
| |
| 30 } | |
| 27 CoordinationUnitProviderImpl* provider() { return &provider_; } | 31 CoordinationUnitProviderImpl* provider() { return &provider_; } |
| 28 | 32 |
| 29 private: | 33 private: |
| 30 base::MessageLoop message_loop_; | 34 base::MessageLoop message_loop_; |
| 31 service_manager::ServiceContextRefFactory service_ref_factory_; | 35 service_manager::ServiceContextRefFactory service_ref_factory_; |
| 36 CoordinationUnitManager coordination_unit_manager_; | |
| 32 CoordinationUnitProviderImpl provider_; | 37 CoordinationUnitProviderImpl provider_; |
| 33 }; | 38 }; |
| 34 | 39 |
| 35 } // namespace resource_coordinator | 40 } // namespace resource_coordinator |
| 36 | 41 |
| 37 #endif // SERVICES_RESOURCE_COORDINATOR_COORDINATION_UNIT_COORDINATION_UNIT_IMP L_UNITTEST_UTIL_H_ | 42 #endif // SERVICES_RESOURCE_COORDINATOR_COORDINATION_UNIT_COORDINATION_UNIT_IMP L_UNITTEST_UTIL_H_ |
| OLD | NEW |