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

Unified Diff: services/service_manager/public/cpp/service.h

Issue 2435153004: Change Service contract to pass ServiceInfo instead of Identity (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/service.h
diff --git a/services/service_manager/public/cpp/service.h b/services/service_manager/public/cpp/service.h
index 83d75b0200bae932c34eb5c27353d8ba3c0d8d0c..8c03aa2f41ab4060ce2af78f4ffc064ad60ee1a7 100644
--- a/services/service_manager/public/cpp/service.h
+++ b/services/service_manager/public/cpp/service.h
@@ -17,6 +17,7 @@ class Connector;
class Identity;
class InterfaceRegistry;
class ServiceContext;
+struct ServiceInfo;
// The primary contract between a Service and the Service Manager, receiving
// lifecycle notifications and connection requests.
@@ -27,16 +28,17 @@ class Service {
// Called once a bidirectional connection with the Service Manager has been
// established.
- // |identity| is the identity of the service instance.
+ // |info| contains information about this instance from the Service Manager
+ // and the service manifest.
// Called exactly once before any calls to OnConnect().
- virtual void OnStart(const Identity& identity);
+ virtual void OnStart(const ServiceInfo& info);
// Called when a connection to this service is brokered by the Service
- // Manager. Override to expose interfaces to the remote service. Return true
+ // Manager. Implement to expose interfaces to the remote service. Return true
// if the connection should succeed. Return false if the connection should
// be rejected and the underlying pipe closed. The default implementation
// returns false.
- virtual bool OnConnect(const Identity& remote_identity,
+ virtual bool OnConnect(const ServiceInfo& remote_info,
InterfaceRegistry* registry);
// Called when the Service Manager has stopped tracking this instance. The
« no previous file with comments | « services/service_manager/public/cpp/lib/service_test.cc ('k') | services/service_manager/public/cpp/service_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698