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

Side by Side Diff: services/service_manager/standalone/context.cc

Issue 2804373002: Eliminate Connector::Connect(), Connection, etc. (Closed)
Patch Set: . Created 3 years, 8 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
OLDNEW
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
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
OLDNEW
« no previous file with comments | « services/service_manager/service_manager.cc ('k') | services/service_manager/tests/connect/connect_test_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698