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

Unified Diff: services/ui/service.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 | « services/ui/service.h ('k') | services/ui/test_wm/test_wm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/service.cc
diff --git a/services/ui/service.cc b/services/ui/service.cc
index e67356c8e92c21ab69e5bab913cb2019f9a863ee..9861c2886a5aa73635db7bcaafba19162a122f76 100644
--- a/services/ui/service.cc
+++ b/services/ui/service.cc
@@ -137,9 +137,9 @@ void Service::AddUserIfNecessary(
window_server_->user_id_tracker()->AddUserId(remote_identity.user_id());
}
-void Service::OnStart(service_manager::ServiceContext* context) {
+void Service::OnStart() {
base::PlatformThread::SetName("mus");
- tracing_.Initialize(context->connector(), context->identity().name());
+ tracing_.Initialize(context()->connector(), context()->identity().name());
TRACE_EVENT0("mus", "Service::Initialize started");
test_config_ = base::CommandLine::ForCurrentProcess()->HasSwitch(
@@ -150,7 +150,7 @@ void Service::OnStart(service_manager::ServiceContext* context) {
ui::test::SetUseOverrideRedirectWindowByDefault(true);
#endif
- InitializeResources(context->connector());
+ InitializeResources(context()->connector());
#if defined(USE_OZONE)
// The ozone platform can provide its own event source. So initialize the
@@ -158,7 +158,7 @@ void Service::OnStart(service_manager::ServiceContext* context) {
// Because GL libraries need to be initialized before entering the sandbox,
// in MUS, |InitializeForUI| will load the GL libraries.
ui::OzonePlatform::InitParams params;
- params.connector = context->connector();
+ params.connector = context()->connector();
params.single_process = false;
ui::OzonePlatform::InitializeForUI(params);
@@ -195,7 +195,7 @@ void Service::OnStart(service_manager::ServiceContext* context) {
platform_screen_->Init(window_server_->display_manager());
- ime_server_.Init(context->connector());
+ ime_server_.Init(context()->connector());
}
bool Service::OnConnect(const service_manager::ServiceInfo& remote_info,
« no previous file with comments | « services/ui/service.h ('k') | services/ui/test_wm/test_wm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698