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

Side by Side Diff: mojo/shell/tests/lifecycle/lifecycle_unittest.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/tests/connect/connect_unittest.cc ('k') | mojo/shell/tests/loader_unittest.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 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 "base/base_paths.h" 5 #include "base/base_paths.h"
6 #include "base/base_switches.h" 6 #include "base/base_switches.h"
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 filter->filter.insert("*", std::move(test_interfaces)); 211 filter->filter.insert("*", std::move(test_interfaces));
212 212
213 mojo::shell::mojom::ShellPtr shell; 213 mojo::shell::mojom::ShellPtr shell;
214 connector()->ConnectToInterface("mojo:shell", &shell); 214 connector()->ConnectToInterface("mojo:shell", &shell);
215 215
216 mojo::shell::mojom::ShellClientFactoryPtr factory; 216 mojo::shell::mojom::ShellClientFactoryPtr factory;
217 factory.Bind(mojo::InterfacePtrInfo<mojo::shell::mojom::ShellClientFactory>( 217 factory.Bind(mojo::InterfacePtrInfo<mojo::shell::mojom::ShellClientFactory>(
218 std::move(pipe), 0u)); 218 std::move(pipe), 0u));
219 219
220 shell->CreateInstanceForFactory(std::move(factory), kTestExeName, 220 shell->CreateInstanceForFactory(std::move(factory), kTestExeName,
221 mojom::Connector::kUserInherit, 221 mojom::kInheritUserID, std::move(filter),
222 std::move(filter), std::move(request)); 222 std::move(request));
223 223
224 base::LaunchOptions options; 224 base::LaunchOptions options;
225 #if defined(OS_WIN) 225 #if defined(OS_WIN)
226 options.handles_to_inherit = &handle_passing_info; 226 options.handles_to_inherit = &handle_passing_info;
227 #elif defined(OS_POSIX) 227 #elif defined(OS_POSIX)
228 options.fds_to_remap = &handle_passing_info; 228 options.fds_to_remap = &handle_passing_info;
229 #endif 229 #endif
230 base::Process process = base::LaunchProcess(child_command_line, options); 230 base::Process process = base::LaunchProcess(child_command_line, options);
231 DCHECK(process.IsValid()); 231 DCHECK(process.IsValid());
232 receiver->SetPID(process.Pid()); 232 receiver->SetPID(process.Pid());
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 loop.Run(); 498 loop.Run();
499 499
500 WaitForInstanceDestruction(); 500 WaitForInstanceDestruction();
501 EXPECT_FALSE(instances()->HasInstanceForName(kTestExeName)); 501 EXPECT_FALSE(instances()->HasInstanceForName(kTestExeName));
502 EXPECT_EQ(0u, instances()->GetNewInstanceCount()); 502 EXPECT_EQ(0u, instances()->GetNewInstanceCount());
503 } 503 }
504 504
505 505
506 } // namespace shell 506 } // namespace shell
507 } // namespace mojo 507 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/tests/connect/connect_unittest.cc ('k') | mojo/shell/tests/loader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698