Index: services/service_manager/public/cpp/lib/interface_registry.cc |
diff --git a/services/service_manager/public/cpp/lib/interface_registry.cc b/services/service_manager/public/cpp/lib/interface_registry.cc |
index 91314a6e5300915f20fcf8c38f7eee5881e03eac..a903dc366feeef04e143e3b2b9c4b61b13db45c3 100644 |
--- a/services/service_manager/public/cpp/lib/interface_registry.cc |
+++ b/services/service_manager/public/cpp/lib/interface_registry.cc |
@@ -13,7 +13,29 @@ |
namespace service_manager { |
namespace { |
-// Returns the set of capabilities required from the target. |
+void SerializeIdentity(const Identity& identity, std::stringstream* stream) { |
+ *stream << identity.name() << "@" << identity.instance() << " run as: " |
+ << identity.user_id(); |
+} |
+ |
+void SerializeSpec(const InterfaceProviderSpec& spec, |
+ std::stringstream* stream) { |
+ *stream << " Providing:\n"; |
+ for (const auto& entry : spec.provides) { |
+ *stream << " capability: " << entry.first << " containing interfaces:\n"; |
+ for (const auto& interface_name : entry.second) |
+ *stream << " " << interface_name << "\n"; |
+ } |
+ *stream << "\n Requiring:\n"; |
+ for (const auto& entry : spec.requires) { |
+ *stream << " From: " << entry.first << ":\n"; |
+ for (const auto& capability_name : entry.second) |
+ *stream << " " << capability_name << "\n"; |
+ } |
+} |
+ |
+} // namespace |
+ |
CapabilitySet GetRequestedCapabilities(const InterfaceProviderSpec& source_spec, |
const Identity& target) { |
CapabilitySet capabilities; |
@@ -34,8 +56,6 @@ CapabilitySet GetRequestedCapabilities(const InterfaceProviderSpec& source_spec, |
return capabilities; |
} |
-// Generates a single set of interfaces that is the union of all interfaces |
-// exposed by the target for the capabilities requested by the source. |
InterfaceSet GetInterfacesToExpose( |
const InterfaceProviderSpec& source_spec, |
const Identity& target, |
@@ -58,29 +78,6 @@ InterfaceSet GetInterfacesToExpose( |
return exposed_interfaces; |
} |
-void SerializeIdentity(const Identity& identity, std::stringstream* stream) { |
- *stream << identity.name() << "@" << identity.instance() << " run as: " |
- << identity.user_id(); |
-} |
- |
-void SerializeSpec(const InterfaceProviderSpec& spec, |
- std::stringstream* stream) { |
- *stream << " Providing:\n"; |
- for (const auto& entry : spec.provides) { |
- *stream << " capability: " << entry.first << " containing interfaces:\n"; |
- for (const auto& interface_name : entry.second) |
- *stream << " " << interface_name << "\n"; |
- } |
- *stream << "\n Requiring:\n"; |
- for (const auto& entry : spec.requires) { |
- *stream << " From: " << entry.first << ":\n"; |
- for (const auto& capability_name : entry.second) |
- *stream << " " << capability_name << "\n"; |
- } |
-} |
- |
-} // namespace |
- |
InterfaceRegistry::InterfaceRegistry(const std::string& name) |
: binding_(this), |
name_(name), |