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

Unified Diff: mash/session/session.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/screenlock/screenlock.cc ('k') | mash/session/session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/session/session.h
diff --git a/mash/session/session.h b/mash/session/session.h
index 61fa2ed23fc8923ec19079c9d9917122a2edd2c9..211387332757bece569bbe2760bf24ce3a8da958 100644
--- a/mash/session/session.h
+++ b/mash/session/session.h
@@ -16,8 +16,9 @@
#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 {
@@ -32,7 +33,7 @@ class Session : 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;
@@ -59,6 +60,8 @@ class Session : public service_manager::Service,
void StartRestartableService(const std::string& url,
const base::Closure& restart_callback);
+ service_manager::ServiceContext* context_ = nullptr;
+
std::map<std::string, std::unique_ptr<service_manager::Connection>>
connections_;
bool screen_locked_;
« no previous file with comments | « mash/screenlock/screenlock.cc ('k') | mash/session/session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698