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

Side by Side Diff: mash/init/init.cc

Issue 2509853002: Convert //mash to define service names in mojom (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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mash/init/init.h" 5 #include "mash/init/init.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/guid.h" 9 #include "base/guid.h"
10 #include "mash/login/public/interfaces/constants.mojom.h"
10 #include "mash/login/public/interfaces/login.mojom.h" 11 #include "mash/login/public/interfaces/login.mojom.h"
11 #include "services/service_manager/public/cpp/connection.h" 12 #include "services/service_manager/public/cpp/connection.h"
12 #include "services/service_manager/public/cpp/connector.h" 13 #include "services/service_manager/public/cpp/connector.h"
13 #include "services/service_manager/public/cpp/interface_registry.h" 14 #include "services/service_manager/public/cpp/interface_registry.h"
14 #include "services/service_manager/public/cpp/service_context.h" 15 #include "services/service_manager/public/cpp/service_context.h"
15 #include "services/tracing/public/interfaces/constants.mojom.h" 16 #include "services/tracing/public/interfaces/constants.mojom.h"
16 #include "services/ui/public/interfaces/constants.mojom.h" 17 #include "services/ui/public/interfaces/constants.mojom.h"
17 18
18 namespace mash { 19 namespace mash {
19 namespace init { 20 namespace init {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 auto it = user_services_.find(user_id); 61 auto it = user_services_.find(user_id);
61 DCHECK(it != user_services_.end()); 62 DCHECK(it != user_services_.end());
62 user_services_.erase(it); 63 user_services_.erase(it);
63 } 64 }
64 65
65 void Init::StartTracing() { 66 void Init::StartTracing() {
66 context()->connector()->Connect(tracing::mojom::kServiceName); 67 context()->connector()->Connect(tracing::mojom::kServiceName);
67 } 68 }
68 69
69 void Init::StartLogin() { 70 void Init::StartLogin() {
70 login_connection_ = context()->connector()->Connect("login"); 71 login_connection_ =
72 context()->connector()->Connect(login::mojom::kServiceName);
71 mash::login::mojom::LoginPtr login; 73 mash::login::mojom::LoginPtr login;
72 login_connection_->GetInterface(&login); 74 login_connection_->GetInterface(&login);
73 login->ShowLoginUI(); 75 login->ShowLoginUI();
74 } 76 }
75 77
76 } // namespace init 78 } // namespace init
77 } // namespace main 79 } // namespace main
OLDNEW
« no previous file with comments | « mash/example/window_type_launcher/window_type_launcher.cc ('k') | mash/init/public/interfaces/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698