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

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

Issue 2209943002: Eliminate outgoing InterfaceProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tracing
Patch Set: . Created 4 years, 4 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 | « services/shell/service_manager.cc ('k') | services/shell/tests/connect/connect_test_app.cc » ('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 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/shell/standalone/context.h" 5 #include "services/shell/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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 catalog_->TakeService())); 173 catalog_->TakeService()));
174 174
175 mojom::InterfaceProviderPtr tracing_remote_interfaces; 175 mojom::InterfaceProviderPtr tracing_remote_interfaces;
176 mojom::InterfaceProviderPtr tracing_local_interfaces; 176 mojom::InterfaceProviderPtr tracing_local_interfaces;
177 new TracingInterfaceProvider(&tracer_, GetProxy(&tracing_local_interfaces)); 177 new TracingInterfaceProvider(&tracer_, GetProxy(&tracing_local_interfaces));
178 178
179 std::unique_ptr<ConnectParams> params(new ConnectParams); 179 std::unique_ptr<ConnectParams> params(new ConnectParams);
180 params->set_source(CreateServiceManagerIdentity()); 180 params->set_source(CreateServiceManagerIdentity());
181 params->set_target(Identity("mojo:tracing", mojom::kRootUserID)); 181 params->set_target(Identity("mojo:tracing", mojom::kRootUserID));
182 params->set_remote_interfaces(mojo::GetProxy(&tracing_remote_interfaces)); 182 params->set_remote_interfaces(mojo::GetProxy(&tracing_remote_interfaces));
183 params->set_local_interfaces(std::move(tracing_local_interfaces));
184 service_manager_->Connect(std::move(params)); 183 service_manager_->Connect(std::move(params));
185 184
186 if (command_line.HasSwitch(tracing::kTraceStartup)) { 185 if (command_line.HasSwitch(tracing::kTraceStartup)) {
187 tracing::mojom::CollectorPtr coordinator; 186 tracing::mojom::CollectorPtr coordinator;
188 auto coordinator_request = GetProxy(&coordinator); 187 auto coordinator_request = GetProxy(&coordinator);
189 tracing_remote_interfaces->GetInterface( 188 tracing_remote_interfaces->GetInterface(
190 tracing::mojom::Collector::Name_, 189 tracing::mojom::Collector::Name_,
191 coordinator_request.PassMessagePipe()); 190 coordinator_request.PassMessagePipe());
192 tracer_.StartCollectingFromTracingService(std::move(coordinator)); 191 tracer_.StartCollectingFromTracingService(std::move(coordinator));
193 } 192 }
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 void Context::Run(const std::string& name) { 251 void Context::Run(const std::string& name) {
253 service_manager_->SetInstanceQuitCallback(base::Bind(&OnInstanceQuit, name)); 252 service_manager_->SetInstanceQuitCallback(base::Bind(&OnInstanceQuit, name));
254 253
255 mojom::InterfaceProviderPtr remote_interfaces; 254 mojom::InterfaceProviderPtr remote_interfaces;
256 mojom::InterfaceProviderPtr local_interfaces; 255 mojom::InterfaceProviderPtr local_interfaces;
257 256
258 std::unique_ptr<ConnectParams> params(new ConnectParams); 257 std::unique_ptr<ConnectParams> params(new ConnectParams);
259 params->set_source(CreateServiceManagerIdentity()); 258 params->set_source(CreateServiceManagerIdentity());
260 params->set_target(Identity(name, mojom::kRootUserID)); 259 params->set_target(Identity(name, mojom::kRootUserID));
261 params->set_remote_interfaces(mojo::GetProxy(&remote_interfaces)); 260 params->set_remote_interfaces(mojo::GetProxy(&remote_interfaces));
262 params->set_local_interfaces(std::move(local_interfaces));
263 service_manager_->Connect(std::move(params)); 261 service_manager_->Connect(std::move(params));
264 } 262 }
265 263
266 } // namespace shell 264 } // namespace shell
OLDNEW
« no previous file with comments | « services/shell/service_manager.cc ('k') | services/shell/tests/connect/connect_test_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698