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

Side by Side Diff: services/resource_coordinator/coordination_unit_provider.cc

Issue 2710823003: NOCOMMIT prototype: GRC service plumbing and process priority
Patch Set: Buildfixes Created 3 years, 9 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_provider.h"
6
7 #include "base/logging.h"
8 #include "mojo/public/cpp/bindings/strong_binding.h"
9 #include "services/resource_coordinator/coordination_unit.h"
10 #include "services/service_manager/public/cpp/connection.h"
11
12 namespace resource_coordinator {
13
14 CoordinationUnitProvider::CoordinationUnitProvider() = default;
15
16 CoordinationUnitProvider::~CoordinationUnitProvider() = default;
17
18 void CoordinationUnitProvider::CreateCoordinationUnit(
19 mojom::CoordinationUnitRequest request,
20 mojom::CoordinationUnitIDPtr options) {
21 // TODO(oysteine): A strong binding here means the first binding set up
22 // to a CoordinationUnit via CoordinationUnitProvider, i.e. the authoritative
23 // one in terms of setting the context, has to outlive all of the other
24 // connections (as the rest are just duplicated and held within
25 // CoordinationUnit). Make sure this assumption is correct, or refactor into
26 // some kind of refcounted thing.
27 mojo::MakeStrongBinding(
28 base::MakeUnique<CoordinationUnit>(std::move(options)),
29 std::move(request));
30 };
31
32 } // namespace resource_coordinator
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698