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

Side by Side Diff: services/resource_coordinator/coordination_unit/coordination_unit_factory.cc

Issue 2892443002: [GRC] Process Coordination Unit support for Global Resource Controller (Closed)
Patch Set: Address CL review feedback Created 3 years, 7 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "services/resource_coordinator/coordination_unit/coordination_unit_fact ory.h"
6
7 #include "services/resource_coordinator/coordination_unit/coordination_unit_impl .h"
8 #include "services/resource_coordinator/coordination_unit/process_coordination_u nit_impl.h"
9 #include "services/resource_coordinator/public/cpp/coordination_unit_id.h"
10 #include "services/resource_coordinator/public/cpp/coordination_unit_types.h"
11 #include "services/service_manager/public/cpp/service_context_ref.h"
12
13 namespace resource_coordinator {
14
15 namespace CoordinationUnitFactory {
16
17 std::unique_ptr<CoordinationUnitImpl> CreateCoordinationUnit(
18 const CoordinationUnitID& id,
19 service_manager::ServiceContextRefFactory* service_ref_factory) {
20 switch (id.type) {
21 case CoordinationUnitType::kProcess:
22 return base::MakeUnique<ProcessCoordinationUnitImpl>(
23 id, service_ref_factory->CreateRef());
24 default:
25 return base::MakeUnique<CoordinationUnitImpl>(
26 id, service_ref_factory->CreateRef());
27 }
28 }
29
30 } // namespace CoordinationUnitFactory
31
32 } // namespace resource_coordinator
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698