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

Side by Side Diff: mojo/shell/background/background_shell.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/services/network/network_service_delegate.cc ('k') | mojo/shell/connect_util.h » ('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 "mojo/shell/background/background_shell.h" 5 #include "mojo/shell/background/background_shell.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 171
172 void BackgroundShell::Init(scoped_ptr<InitParams> init_params) { 172 void BackgroundShell::Init(scoped_ptr<InitParams> init_params) {
173 DCHECK(!thread_); 173 DCHECK(!thread_);
174 thread_.reset(new MojoThread(std::move(init_params))); 174 thread_.reset(new MojoThread(std::move(init_params)));
175 thread_->Start(); 175 thread_->Start();
176 } 176 }
177 177
178 mojom::ShellClientRequest BackgroundShell::CreateShellClientRequest( 178 mojom::ShellClientRequest BackgroundShell::CreateShellClientRequest(
179 const std::string& name) { 179 const std::string& name) {
180 scoped_ptr<ConnectParams> params(new ConnectParams); 180 scoped_ptr<ConnectParams> params(new ConnectParams);
181 params->set_target(Identity(name, std::string(), 181 params->set_target(Identity(name, std::string(), mojom::kRootUserID));
182 mojom::Connector::kUserRoot));
183 mojom::ShellClientRequest request; 182 mojom::ShellClientRequest request;
184 base::WaitableEvent signal(true, false); 183 base::WaitableEvent signal(true, false);
185 thread_->message_loop()->task_runner()->PostTask( 184 thread_->message_loop()->task_runner()->PostTask(
186 FROM_HERE, base::Bind(&MojoThread::CreateShellClientRequest, 185 FROM_HERE, base::Bind(&MojoThread::CreateShellClientRequest,
187 base::Unretained(thread_.get()), &signal, 186 base::Unretained(thread_.get()), &signal,
188 base::Passed(&params), &request)); 187 base::Passed(&params), &request));
189 signal.Wait(); 188 signal.Wait();
190 return request; 189 return request;
191 } 190 }
192 191
193 } // namespace shell 192 } // namespace shell
194 } // namespace mojo 193 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/network/network_service_delegate.cc ('k') | mojo/shell/connect_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698