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

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: Remove unused headers and use forward declarations 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"
oystein (OOO til 10th of July) 2017/05/17 23:06:05 nit: empty line between the associated header file
matthalp 2017/05/18 16:13:45 Done.
6 #include "services/resource_coordinator/coordination_unit/coordination_unit_impl .h"
7 #include "services/resource_coordinator/coordination_unit/process_coordination_u nit_impl.h"
8 #include "services/resource_coordinator/public/cpp/coordination_unit_id.h"
9 #include "services/resource_coordinator/public/cpp/coordination_unit_types.h"
10 #include "services/service_manager/public/cpp/service_context_ref.h"
11
12 namespace resource_coordinator {
13
14 // static
15 std::unique_ptr<CoordinationUnitImpl>
16 CoordinationUnitFactory::CreateCoordinationUnit(
17 const CoordinationUnitID& id,
18 service_manager::ServiceContextRefFactory* service_ref_factory) {
19 switch (id.type) {
20 case CoordinationUnitType::kProcess:
21 return base::MakeUnique<ProcessCoordinationUnitImpl>(
22 id, service_ref_factory->CreateRef());
23 default:
24 return base::MakeUnique<CoordinationUnitImpl>(
25 id, service_ref_factory->CreateRef());
26 }
27 }
28
29 } // namespace resource_coordinator
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698