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

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

Issue 1770533002: Change userid from a uint32_t to a string guid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@33connector
Patch Set: . Created 4 years, 9 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 | « mojo/shell/shell.cc ('k') | mojo/shell/tests/connect/connect_test.mojom » ('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 "mojo/shell/standalone/context.h" 5 #include "mojo/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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 app_catalog = std::move(init_params->app_catalog); 157 app_catalog = std::move(init_params->app_catalog);
158 shell_.reset(new Shell(std::move(runner_factory), blocking_pool_.get(), 158 shell_.reset(new Shell(std::move(runner_factory), blocking_pool_.get(),
159 std::move(app_catalog))); 159 std::move(app_catalog)));
160 160
161 shell::mojom::InterfaceProviderPtr tracing_remote_interfaces; 161 shell::mojom::InterfaceProviderPtr tracing_remote_interfaces;
162 shell::mojom::InterfaceProviderPtr tracing_local_interfaces; 162 shell::mojom::InterfaceProviderPtr tracing_local_interfaces;
163 new TracingInterfaceProvider(&tracer_, GetProxy(&tracing_local_interfaces)); 163 new TracingInterfaceProvider(&tracer_, GetProxy(&tracing_local_interfaces));
164 164
165 scoped_ptr<ConnectParams> params(new ConnectParams); 165 scoped_ptr<ConnectParams> params(new ConnectParams);
166 params->set_source(CreateShellIdentity()); 166 params->set_source(CreateShellIdentity());
167 params->set_target(Identity("mojo:tracing", std::string(), 167 params->set_target(
168 mojom::Connector::kUserInherit)); 168 Identity("mojo:tracing", std::string(), mojom::kInheritUserID));
169 params->set_remote_interfaces(GetProxy(&tracing_remote_interfaces)); 169 params->set_remote_interfaces(GetProxy(&tracing_remote_interfaces));
170 params->set_local_interfaces(std::move(tracing_local_interfaces)); 170 params->set_local_interfaces(std::move(tracing_local_interfaces));
171 shell_->Connect(std::move(params)); 171 shell_->Connect(std::move(params));
172 172
173 if (command_line.HasSwitch(tracing::kTraceStartup)) { 173 if (command_line.HasSwitch(tracing::kTraceStartup)) {
174 tracing::TraceCollectorPtr coordinator; 174 tracing::TraceCollectorPtr coordinator;
175 auto coordinator_request = GetProxy(&coordinator); 175 auto coordinator_request = GetProxy(&coordinator);
176 tracing_remote_interfaces->GetInterface( 176 tracing_remote_interfaces->GetInterface(
177 tracing::TraceCollector::Name_, coordinator_request.PassMessagePipe()); 177 tracing::TraceCollector::Name_, coordinator_request.PassMessagePipe());
178 tracer_.StartCollectingFromTracingService(std::move(coordinator)); 178 tracer_.StartCollectingFromTracingService(std::move(coordinator));
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 } 231 }
232 232
233 void Context::Run(const std::string& name) { 233 void Context::Run(const std::string& name) {
234 shell_->SetInstanceQuitCallback(base::Bind(&OnInstanceQuit, name)); 234 shell_->SetInstanceQuitCallback(base::Bind(&OnInstanceQuit, name));
235 235
236 shell::mojom::InterfaceProviderPtr remote_interfaces; 236 shell::mojom::InterfaceProviderPtr remote_interfaces;
237 shell::mojom::InterfaceProviderPtr local_interfaces; 237 shell::mojom::InterfaceProviderPtr local_interfaces;
238 238
239 scoped_ptr<ConnectParams> params(new ConnectParams); 239 scoped_ptr<ConnectParams> params(new ConnectParams);
240 params->set_source(CreateShellIdentity()); 240 params->set_source(CreateShellIdentity());
241 params->set_target(Identity(name, std::string(), 241 params->set_target(Identity(name, std::string(), mojom::kRootUserID));
242 mojom::Connector::kUserRoot));
243 params->set_remote_interfaces(GetProxy(&remote_interfaces)); 242 params->set_remote_interfaces(GetProxy(&remote_interfaces));
244 params->set_local_interfaces(std::move(local_interfaces)); 243 params->set_local_interfaces(std::move(local_interfaces));
245 shell_->Connect(std::move(params)); 244 shell_->Connect(std::move(params));
246 } 245 }
247 246
248 } // namespace shell 247 } // namespace shell
249 } // namespace mojo 248 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/shell.cc ('k') | mojo/shell/tests/connect/connect_test.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698