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

Side by Side Diff: content/public/common/simple_connection_filter.cc

Issue 2810343002: Convert UtilityThread/Clients to add ConnectionFilters instead of using ChildThread's InterfaceRegi… (Closed)
Patch Set: . Created 3 years, 8 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
« no previous file with comments | « content/public/common/simple_connection_filter.h ('k') | content/shell/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "content/public/common/simple_connection_filter.h"
6
7 #include "services/service_manager/public/cpp/binder_registry.h"
8 #include "services/service_manager/public/cpp/service_info.h"
9
10 namespace content {
11
12 SimpleConnectionFilter::SimpleConnectionFilter(
13 std::unique_ptr<service_manager::BinderRegistry> registry)
14 : registry_(std::move(registry)) {}
15
16 SimpleConnectionFilter::~SimpleConnectionFilter() {}
17
18 void SimpleConnectionFilter::OnBindInterface(
19 const service_manager::ServiceInfo& source_info,
20 const std::string& interface_name,
21 mojo::ScopedMessagePipeHandle* interface_pipe,
22 service_manager::Connector* connector) {
23 if (registry_->CanBindInterface(interface_name)) {
24 registry_->BindInterface(source_info.identity, interface_name,
25 std::move(*interface_pipe));
26 }
27 }
28
29 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/simple_connection_filter.h ('k') | content/shell/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698