Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Side by Side Diff: services/resource_coordinator/coordination_unit/coordination_unit_impl_unittest_util.h

Issue 2942403002: [GRC] Coordination Unit Graph Observer (Closed)
Patch Set: Fix unittest and OnCoordinationUnitWillBeDestroyed Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_mana ger.h"
10 #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"
11 #include "services/service_manager/public/cpp/service_context_ref.h" 11 #include "services/service_manager/public/cpp/service_context_ref.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 namespace resource_coordinator { 14 namespace resource_coordinator {
15 15
16 class CoordinationUnitImplTestBase : public testing::Test { 16 class CoordinationUnitImplTestBase : public testing::Test {
17 public: 17 public:
18 CoordinationUnitImplTestBase(); 18 CoordinationUnitImplTestBase();
19 ~CoordinationUnitImplTestBase() override; 19 ~CoordinationUnitImplTestBase() override;
20 20
21 // testing::Test: 21 // testing::Test:
22 void TearDown() override; 22 void TearDown() override;
23 23
24 protected: 24 protected:
25 service_manager::ServiceContextRefFactory* service_context_ref_factory() { 25 service_manager::ServiceContextRefFactory* service_context_ref_factory() {
26 return &service_ref_factory_; 26 return &service_ref_factory_;
27 } 27 }
28 CoordinationUnitManager* coordination_unit_manager() { 28 CoordinationUnitManager& coordination_unit_manager() {
29 return &coordination_unit_manager_; 29 return coordination_unit_manager_;
30 } 30 }
31 CoordinationUnitProviderImpl* provider() { return &provider_; } 31 CoordinationUnitProviderImpl* provider() { return &provider_; }
32 32
33 private: 33 private:
34 base::MessageLoop message_loop_; 34 base::MessageLoop message_loop_;
35 service_manager::ServiceContextRefFactory service_ref_factory_; 35 service_manager::ServiceContextRefFactory service_ref_factory_;
36 CoordinationUnitManager coordination_unit_manager_; 36 CoordinationUnitManager coordination_unit_manager_;
37 CoordinationUnitProviderImpl provider_; 37 CoordinationUnitProviderImpl provider_;
38 }; 38 };
39 39
40 } // namespace resource_coordinator 40 } // namespace resource_coordinator
41 41
42 #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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698