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

Unified Diff: services/catalog/catalog.h

Issue 2476063002: Service Manager: Rework Service and ServiceContext lifetime (Closed)
Patch Set: . Created 4 years, 1 month 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 | « media/mojo/services/media_service.cc ('k') | services/catalog/catalog.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/catalog/catalog.h
diff --git a/services/catalog/catalog.h b/services/catalog/catalog.h
index 9cc0c9079f6e2aeeac42a88baa588d2afdbab429..5c2b9307a377493c24af8f3c17ab2d30187f8e34 100644
--- a/services/catalog/catalog.h
+++ b/services/catalog/catalog.h
@@ -16,6 +16,7 @@
#include "mojo/public/cpp/bindings/binding_set.h"
#include "services/catalog/public/interfaces/catalog.mojom.h"
#include "services/catalog/types.h"
+#include "services/service_manager/public/cpp/interface_factory.h"
#include "services/service_manager/public/cpp/service.h"
#include "services/service_manager/public/interfaces/resolver.mojom.h"
#include "services/service_manager/public/interfaces/service.mojom.h"
@@ -43,8 +44,7 @@ class Store;
// Creates and owns an instance of the catalog. Exposes a ServicePtr that
// can be passed to the service manager, potentially in a different process.
class Catalog
- : public service_manager::Service,
- public service_manager::InterfaceFactory<mojom::Catalog>,
+ : public service_manager::InterfaceFactory<mojom::Catalog>,
public service_manager::InterfaceFactory<filesystem::mojom::Directory>,
public service_manager::InterfaceFactory<
service_manager::mojom::Resolver>,
@@ -69,15 +69,13 @@ class Catalog
service_manager::mojom::ServicePtr TakeService();
private:
+ class ServiceImpl;
+
explicit Catalog(std::unique_ptr<Store> store);
// Starts a scane for system packages.
void ScanSystemPackageDir();
- // service_manager::Service:
- bool OnConnect(const service_manager::ServiceInfo& remote_info,
- service_manager::InterfaceRegistry* registry) override;
-
// service_manager::InterfaceFactory<service_manager::mojom::Resolver>:
void Create(const service_manager::Identity& remote_identity,
service_manager::mojom::ResolverRequest request) override;
@@ -107,7 +105,7 @@ class Catalog
std::unique_ptr<Store> store_;
service_manager::mojom::ServicePtr service_;
- std::unique_ptr<service_manager::ServiceContext> service_manager_connection_;
+ std::unique_ptr<service_manager::ServiceContext> service_context_;
std::map<std::string, std::unique_ptr<Instance>> instances_;
« no previous file with comments | « media/mojo/services/media_service.cc ('k') | services/catalog/catalog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698