OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "services/service_manager/standalone/context.h" | 5 #include "services/service_manager/standalone/context.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <utility> | 10 #include <utility> |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 | 149 |
150 void Context::RunCommandLineApplication() { | 150 void Context::RunCommandLineApplication() { |
151 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 151 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
152 if (command_line->HasSwitch(kService)) | 152 if (command_line->HasSwitch(kService)) |
153 Run(command_line->GetSwitchValueASCII(kService)); | 153 Run(command_line->GetSwitchValueASCII(kService)); |
154 } | 154 } |
155 | 155 |
156 void Context::Run(const std::string& name) { | 156 void Context::Run(const std::string& name) { |
157 service_manager_->SetInstanceQuitCallback(base::Bind(&OnInstanceQuit, name)); | 157 service_manager_->SetInstanceQuitCallback(base::Bind(&OnInstanceQuit, name)); |
158 | 158 |
159 mojom::InterfaceProviderPtr remote_interfaces; | |
160 mojom::InterfaceProviderPtr local_interfaces; | |
161 | |
162 std::unique_ptr<ConnectParams> params(new ConnectParams); | 159 std::unique_ptr<ConnectParams> params(new ConnectParams); |
163 params->set_source(CreateServiceManagerIdentity()); | 160 params->set_source(CreateServiceManagerIdentity()); |
164 params->set_target(Identity(name, mojom::kRootUserID)); | 161 params->set_target(Identity(name, mojom::kRootUserID)); |
165 params->set_remote_interfaces(mojo::MakeRequest(&remote_interfaces)); | |
166 service_manager_->Connect(std::move(params)); | 162 service_manager_->Connect(std::move(params)); |
167 } | 163 } |
168 | 164 |
169 } // namespace service_manager | 165 } // namespace service_manager |
OLD | NEW |