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

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: Rebase 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 <memory>
8 #include <utility>
9
10 #include "services/resource_coordinator/coordination_unit/coordination_unit_impl .h"
11 #include "services/resource_coordinator/coordination_unit/process_coordination_u nit_impl.h"
12 #include "services/resource_coordinator/public/cpp/coordination_unit_id.h"
13 #include "services/resource_coordinator/public/cpp/coordination_unit_types.h"
14 #include "services/service_manager/public/cpp/service_context_ref.h"
15
16 namespace resource_coordinator {
17
18 namespace coordination_unit_factory {
19
20 std::unique_ptr<CoordinationUnitImpl> CreateCoordinationUnit(
21 const CoordinationUnitID& id,
22 std::unique_ptr<service_manager::ServiceContextRef> service_ref) {
23 switch (id.type) {
24 case CoordinationUnitType::kProcess:
25 return base::MakeUnique<ProcessCoordinationUnitImpl>(
26 id, std::move(service_ref));
27 default:
28 return base::MakeUnique<CoordinationUnitImpl>(id, std::move(service_ref));
29 }
30 }
31
32 } // namespace coordination_unit_factory
33
34 } // namespace resource_coordinator
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698