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

Unified Diff: mash/session/session.cc

Issue 2487573002: Service Manager: Remove ServiceContext* arg from Service::OnStart() (Closed)
Patch Set: rebase 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/session/session.h ('k') | mash/task_viewer/task_viewer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/session/session.cc
diff --git a/mash/session/session.cc b/mash/session/session.cc
index a4640efb4fe93f2dae61a6e84139da4cfcfd08f8..f10b3535fce5160c6598813b139f74fbcea26b1a 100644
--- a/mash/session/session.cc
+++ b/mash/session/session.cc
@@ -29,14 +29,12 @@ namespace session {
Session::Session() : screen_locked_(false) {}
Session::~Session() {}
-void Session::OnStart(service_manager::ServiceContext* context) {
- context_ = context;
-
+void Session::OnStart() {
StartWindowManager();
StartQuickLaunch();
// Launch a chrome window for dev convience; don't do this in the long term.
- context->connector()->Connect("service:content_browser");
+ context()->connector()->Connect("service:content_browser");
}
bool Session::OnConnect(const service_manager::ServiceInfo& remote_info,
@@ -49,7 +47,7 @@ void Session::Logout() {
// TODO(beng): Notify connected listeners that login is happening, potentially
// give them the option to stop it.
mash::login::mojom::LoginPtr login;
- context_->connector()->ConnectToInterface("service:login", &login);
+ context()->connector()->ConnectToInterface("service:login", &login);
login->ShowLoginUI();
// This kills the user environment.
base::MessageLoop::current()->QuitWhenIdle();
@@ -57,7 +55,7 @@ void Session::Logout() {
void Session::SwitchUser() {
mash::login::mojom::LoginPtr login;
- context_->connector()->ConnectToInterface("service:login", &login);
+ context()->connector()->ConnectToInterface("service:login", &login);
login->SwitchUser();
}
@@ -126,7 +124,7 @@ void Session::StartRestartableService(
// TODO(beng): This would be the place to insert logic that counted restarts
// to avoid infinite crash-restart loops.
std::unique_ptr<service_manager::Connection> connection =
- context_->connector()->Connect(url);
+ context()->connector()->Connect(url);
// Note: |connection| may be null if we've lost our connection to the service
// manager.
if (connection) {
« no previous file with comments | « mash/session/session.h ('k') | mash/task_viewer/task_viewer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698