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

Unified Diff: services/service_manager/public/cpp/lib/service_context.cc

Issue 2425563004: Support reading multiple InterfaceProviderSpecs from manifests (Closed)
Patch Set: . Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: services/service_manager/public/cpp/lib/service_context.cc
diff --git a/services/service_manager/public/cpp/lib/service_context.cc b/services/service_manager/public/cpp/lib/service_context.cc
index 1460291e8522e3df0251b826a55af311d0633322..42f924147cd7c6f4562cd996b0092e35b2f6b07c 100644
--- a/services/service_manager/public/cpp/lib/service_context.cc
+++ b/services/service_manager/public/cpp/lib/service_context.cc
@@ -49,9 +49,9 @@ void ServiceContext::SetConnectionLostClosure(const base::Closure& closure) {
////////////////////////////////////////////////////////////////////////////////
// ServiceContext, mojom::Service implementation:
-void ServiceContext::OnStart(const service_manager::Identity& identity,
+void ServiceContext::OnStart(const ServiceInfo& info,
const OnStartCallback& callback) {
- identity_ = identity;
+ identity_ = info.identity;
if (!initialize_handler_.is_null())
initialize_handler_.Run();
@@ -61,16 +61,16 @@ void ServiceContext::OnStart(const service_manager::Identity& identity,
}
void ServiceContext::OnConnect(
- const Identity& source,
+ const ServiceInfo& source_info,
mojom::InterfaceProviderRequest interfaces,
const InterfaceSet& allowed_interfaces,
const CapabilitySet& allowed_capabilities) {
// TODO(beng): do something with |allowed_capabilities|.
- std::unique_ptr<InterfaceRegistry> registry(
- new InterfaceRegistry(identity_, source, allowed_interfaces));
+ auto registry = base::MakeUnique<InterfaceRegistry>(
+ identity_, source_info.identity, allowed_interfaces);
registry->Bind(std::move(interfaces));
- if (!service_->OnConnect(source, registry.get()))
+ if (!service_->OnConnect(source_info.identity, registry.get()))
return;
// TODO(beng): it appears we never prune this list. We should, when the
« no previous file with comments | « services/service_manager/public/cpp/interface_provider_spec.h ('k') | services/service_manager/public/cpp/lib/service_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698