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

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

Issue 2938443002: [GRC] UKM Support (Closed)
Patch Set: Refactor 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_MANAGE R_H_ 5 #ifndef SERVICES_RESOURCE_COORDINATOR_COORDINATION_UNIT_COORDINATION_UNIT_MANAGE R_H_
6 #define SERVICES_RESOURCE_COORDINATOR_COORDINATION_UNIT_COORDINATION_UNIT_MANAGE R_H_ 6 #define SERVICES_RESOURCE_COORDINATOR_COORDINATION_UNIT_COORDINATION_UNIT_MANAGE R_H_
7 7
8 #include <memory>
9 #include <vector>
10
8 #include "base/macros.h" 11 #include "base/macros.h"
9 12
13 namespace ukm {
14 class MojoUkmRecorder;
15 class UkmEntryBuilder;
16 }
17
10 namespace service_manager { 18 namespace service_manager {
11 class BinderRegistry; 19 class BinderRegistry;
12 class ServiceContextRefFactory; 20 class ServiceContextRefFactory;
13 } // service_manager 21 } // service_manager
14 22
15 namespace resource_coordinator { 23 namespace resource_coordinator {
16 24
17 // The CoordinationUnitManager is a singleton that encapsulates all 25 // The CoordinationUnitManager is a singleton that encapsulates all
18 // aspects of Coordination Units within the ResourceCoordinatorService. 26 // aspects of Coordination Units within the ResourceCoordinatorService.
19 // All functionality for dealing with CoordinationUnits should be contained 27 // All functionality for dealing with CoordinationUnits should be contained
20 // within this class or classes that are owned by it 28 // within this class or classes that are owned by it
21 class CoordinationUnitManager { 29 class CoordinationUnitManager {
22 public: 30 public:
23 CoordinationUnitManager(); 31 CoordinationUnitManager();
24 ~CoordinationUnitManager(); 32 ~CoordinationUnitManager();
25 33
26 void OnStart(service_manager::BinderRegistry* registry, 34 void OnStart(service_manager::BinderRegistry* registry,
27 service_manager::ServiceContextRefFactory* service_ref_factory); 35 service_manager::ServiceContextRefFactory* service_ref_factory);
36 void SetUkmRecorder(ukm::MojoUkmRecorder* ukm_recorder);
37 std::unique_ptr<ukm::UkmEntryBuilder> CreateUkmEntryBuilder(
38 const char* event_name);
28 39
29 private: 40 private:
41 ukm::MojoUkmRecorder* ukm_recorder_;
oystein (OOO til 10th of July) 2017/06/22 20:27:02 = nullptr;
matthalp 2017/06/22 22:59:31 Done.
42
30 static void Create( 43 static void Create(
31 service_manager::ServiceContextRefFactory* service_ref_factory); 44 service_manager::ServiceContextRefFactory* service_ref_factory);
32 45
33 DISALLOW_COPY_AND_ASSIGN(CoordinationUnitManager); 46 DISALLOW_COPY_AND_ASSIGN(CoordinationUnitManager);
34 }; 47 };
35 48
36 } // namespace resource_coordinator 49 } // namespace resource_coordinator
37 50
38 #endif // SERVICES_RESOURCE_COORDINATOR_COORDINATION_UNIT_COORDINATION_UNIT_MAN AGER_H_ 51 #endif // SERVICES_RESOURCE_COORDINATOR_COORDINATION_UNIT_COORDINATION_UNIT_MAN AGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698