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

Side by Side Diff: services/service_manager/public/cpp/lib/interface_registry.cc

Issue 2804373002: Eliminate Connector::Connect(), Connection, etc. (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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "services/service_manager/public/cpp/interface_registry.h" 5 #include "services/service_manager/public/cpp/interface_registry.h"
6 6
7 #include <iterator> 7 #include <iterator>
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
11 #include "mojo/public/cpp/bindings/message.h" 11 #include "mojo/public/cpp/bindings/message.h"
12 #include "services/service_manager/public/cpp/connection.h"
13 12
14 namespace service_manager { 13 namespace service_manager {
15 namespace { 14 namespace {
16 15
17 void SerializeIdentity(const Identity& identity, std::stringstream* stream) { 16 void SerializeIdentity(const Identity& identity, std::stringstream* stream) {
18 *stream << identity.name() << "@" << identity.instance() << " run as: " 17 *stream << identity.name() << "@" << identity.instance() << " run as: "
19 << identity.user_id(); 18 << identity.user_id();
20 } 19 }
21 20
22 void SerializeSpec(const InterfaceProviderSpec& spec, 21 void SerializeSpec(const InterfaceProviderSpec& spec,
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 exposed_interfaces_.size() == 1 && exposed_interfaces_.count("*") == 1; 258 exposed_interfaces_.size() == 1 && exposed_interfaces_.count("*") == 1;
260 } 259 }
261 260
262 void InterfaceRegistry::OnConnectionError() { 261 void InterfaceRegistry::OnConnectionError() {
263 std::list<base::Closure> closures = connection_lost_closures_; 262 std::list<base::Closure> closures = connection_lost_closures_;
264 for (const auto& closure : closures) 263 for (const auto& closure : closures)
265 closure.Run(); 264 closure.Run();
266 } 265 }
267 266
268 } // namespace service_manager 267 } // namespace service_manager
OLDNEW
« no previous file with comments | « services/service_manager/public/cpp/lib/identity.cc ('k') | services/service_manager/public/cpp/lib/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698