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

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

Issue 1943993005: Remove wildcard usage in interface lists (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 7 months 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
« no previous file with comments | « mash/init/init.h ('k') | mash/init/manifest.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/login.mojom.h" 10 #include "mash/login/public/interfaces/login.mojom.h"
11 #include "services/shell/public/cpp/connection.h" 11 #include "services/shell/public/cpp/connection.h"
12 #include "services/shell/public/cpp/connector.h" 12 #include "services/shell/public/cpp/connector.h"
13 13
14 namespace mash { 14 namespace mash {
15 namespace init { 15 namespace init {
16 16
17 Init::Init() 17 Init::Init()
18 : connector_(nullptr) {} 18 : connector_(nullptr) {}
19 Init::~Init() {} 19 Init::~Init() {}
20 20
21 void Init::Initialize(shell::Connector* connector, 21 void Init::Initialize(shell::Connector* connector,
22 const shell::Identity& identity, 22 const shell::Identity& identity,
23 uint32_t id) { 23 uint32_t id) {
24 connector_ = connector; 24 connector_ = connector;
25 connector_->Connect("mojo:mus"); 25 connector_->Connect("mojo:mus");
26 StartTracing(); 26 StartTracing();
27 StartResourceProvider();
28 StartLogin(); 27 StartLogin();
29 } 28 }
30 29
31 bool Init::AcceptConnection(shell::Connection* connection) { 30 bool Init::AcceptConnection(shell::Connection* connection) {
32 connection->AddInterface<mojom::Init>(this); 31 connection->AddInterface<mojom::Init>(this);
33 return true; 32 return true;
34 } 33 }
35 34
36 void Init::StartService(const mojo::String& name, 35 void Init::StartService(const mojo::String& name,
37 const mojo::String& user_id) { 36 const mojo::String& user_id) {
(...skipping 20 matching lines...) Expand all
58 void Init::UserServiceQuit(const std::string& user_id) { 57 void Init::UserServiceQuit(const std::string& user_id) {
59 auto it = user_services_.find(user_id); 58 auto it = user_services_.find(user_id);
60 DCHECK(it != user_services_.end()); 59 DCHECK(it != user_services_.end());
61 user_services_.erase(it); 60 user_services_.erase(it);
62 } 61 }
63 62
64 void Init::StartTracing() { 63 void Init::StartTracing() {
65 connector_->Connect("mojo:tracing"); 64 connector_->Connect("mojo:tracing");
66 } 65 }
67 66
68 void Init::StartResourceProvider() {
69 connector_->Connect("mojo:resource_provider");
70 }
71
72 void Init::StartLogin() { 67 void Init::StartLogin() {
73 login_connection_ = connector_->Connect("mojo:login"); 68 login_connection_ = connector_->Connect("mojo:login");
74 login_connection_->AddInterface<mojom::Init>(this); 69 login_connection_->AddInterface<mojom::Init>(this);
75 mash::login::mojom::LoginPtr login; 70 mash::login::mojom::LoginPtr login;
76 login_connection_->GetInterface(&login); 71 login_connection_->GetInterface(&login);
77 login->ShowLoginUI(); 72 login->ShowLoginUI();
78 } 73 }
79 74
80 } // namespace init 75 } // namespace init
81 } // namespace main 76 } // namespace main
OLDNEW
« no previous file with comments | « mash/init/init.h ('k') | mash/init/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698