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

Unified Diff: mash/init/init.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 | « mash/example/window_type_launcher/window_type_launcher.cc ('k') | mash/init/init.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/init/init.h
diff --git a/mash/init/init.h b/mash/init/init.h
index d8d3a6335b785b46b72f10fa25a16daf78f1f67b..4ee523f1b54a4cd60c6be64a525868506c0c6834 100644
--- a/mash/init/init.h
+++ b/mash/init/init.h
@@ -13,10 +13,12 @@
#include "mash/init/public/interfaces/init.mojom.h"
#include "mojo/public/cpp/bindings/binding_set.h"
#include "services/service_manager/public/cpp/connector.h"
+#include "services/service_manager/public/cpp/interface_factory.h"
#include "services/service_manager/public/cpp/service.h"
-namespace mojo {
+namespace service_manager {
class Connection;
+class ServiceContext;
}
namespace mash {
@@ -31,7 +33,7 @@ class Init : public service_manager::Service,
private:
// service_manager::Service:
- void OnStart(const service_manager::ServiceInfo& info) override;
+ void OnStart(service_manager::ServiceContext* context) override;
bool OnConnect(const service_manager::ServiceInfo& remote_info,
service_manager::InterfaceRegistry* registry) override;
@@ -49,6 +51,8 @@ class Init : public service_manager::Service,
void StartTracing();
void StartLogin();
+ service_manager::ServiceContext* context_ = nullptr;
+
std::unique_ptr<service_manager::Connection> login_connection_;
mojo::BindingSet<mojom::Init> init_bindings_;
std::map<std::string, std::unique_ptr<service_manager::Connection>>
« no previous file with comments | « mash/example/window_type_launcher/window_type_launcher.cc ('k') | mash/init/init.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698