| Index: content/common/service_manager/embedded_service_runner.h
|
| diff --git a/content/common/service_manager/embedded_service_runner.h b/content/common/service_manager/embedded_service_runner.h
|
| index 0d58565ca17744796934a23104ae9cfe2488d430..9144c5c0f771b93e343d28c71239c2ffb2dfff18 100644
|
| --- a/content/common/service_manager/embedded_service_runner.h
|
| +++ b/content/common/service_manager/embedded_service_runner.h
|
| @@ -19,37 +19,30 @@
|
|
|
| namespace content {
|
|
|
| -// Hosts an in-process service instance that supports multiple Service
|
| -// connections. The first incoming connection will invoke a provided factory
|
| -// function to instantiate the service, and the service will automatically be
|
| -// torn down when its last connection is lost. The service may be launched and
|
| -// torn down multiple times by a single EmbeddedServiceRunner instance.
|
| +// Hosts in-process service instances for a given service.
|
| class EmbeddedServiceRunner {
|
| public:
|
| - // Constructs a runner which hosts a service. If an existing instance of the
|
| - // service is not running when an incoming connection is made, details from
|
| - // |info| will be used to construct a new instance.
|
| + // Constructs a runner for a service. Every new instance started by the
|
| + // Service Manager for this service will invoke the factory function on |info|
|
| + // to create a new concrete instance of the Service implementation.
|
| EmbeddedServiceRunner(const base::StringPiece& name,
|
| const ServiceInfo& info);
|
| ~EmbeddedServiceRunner();
|
|
|
| - // Binds an incoming ServiceRequest for this service. If the service isn't
|
| - // already running, it is started. Otherwise the request is bound to the
|
| - // running instance.
|
| + // Binds an incoming ServiceRequest for this service. This creates a new
|
| + // instance of the Service implementation.
|
| void BindServiceRequest(service_manager::mojom::ServiceRequest request);
|
|
|
| - // Sets a callback to run after the service loses its last connection and is
|
| - // torn down.
|
| + // Sets a callback to run when all instances of the service have stopped.
|
| void SetQuitClosure(const base::Closure& quit_closure);
|
|
|
| private:
|
| - class Instance;
|
| + class InstanceManager;
|
|
|
| void OnQuit();
|
|
|
| - // A reference to the service instance which may operate on the
|
| - // |task_runner_|'s thread.
|
| - scoped_refptr<Instance> instance_;
|
| + // A reference to the instance manager, which may operate on another thread.
|
| + scoped_refptr<InstanceManager> instance_manager_;
|
|
|
| base::Closure quit_closure_;
|
|
|
|
|