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

Unified Diff: services/shell/service_manager.h

Issue 2211203002: Cancel ServiceManager connection requests if source Instance dies (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | services/shell/service_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/shell/service_manager.h
diff --git a/services/shell/service_manager.h b/services/shell/service_manager.h
index b6226f14800fb1a92e56757185eec35ca1d1b8f9..d6e6b5d73880ce2988c61281123a7c922a61fb1f 100644
--- a/services/shell/service_manager.h
+++ b/services/shell/service_manager.h
@@ -102,8 +102,13 @@ class ServiceManager : public Service {
// If |service| is not null, there must not be an instance of the target
// application already running. The Service Manager will create a new instance
// and use |service| to control it.
+ //
+ // If |instance| is not null, the lifetime of the connection request is
+ // bounded by that of |instance|. The connection will be cancelled dropped if
+ // |instance| is destroyed.
void Connect(std::unique_ptr<ConnectParams> params,
- mojom::ServicePtr service);
+ mojom::ServicePtr service,
+ base::WeakPtr<Instance> source_instance);
// Returns a running instance matching |identity|. This might be an instance
// running as a different user if one is available that services all users.
@@ -139,6 +144,8 @@ class ServiceManager : public Service {
// |result| contains the result of the resolve operation.
void OnGotResolvedName(std::unique_ptr<ConnectParams> params,
mojom::ServicePtr service,
+ bool has_source_instance,
+ base::WeakPtr<Instance> source_instance,
mojom::ResolveResultPtr result);
base::WeakPtr<ServiceManager> GetWeakPtr();
« no previous file with comments | « no previous file | services/shell/service_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698