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

Side by Side Diff: services/service_manager/tests/service_manager/service_manager_unittest.cc

Issue 2589663003: mojo:: Rename mojo::GetProxy() to mojo::MakeRequest() (Closed)
Patch Set: Rebase Created 3 years, 12 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <memory> 8 #include <memory>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 std::string child_token = mojo::edk::GenerateRandomToken(); 179 std::string child_token = mojo::edk::GenerateRandomToken();
180 service_manager::mojom::ServicePtr client = 180 service_manager::mojom::ServicePtr client =
181 service_manager::PassServiceRequestOnCommandLine(&child_command_line, 181 service_manager::PassServiceRequestOnCommandLine(&child_command_line,
182 child_token); 182 child_token);
183 service_manager::mojom::PIDReceiverPtr receiver; 183 service_manager::mojom::PIDReceiverPtr receiver;
184 184
185 service_manager::Identity target("service_manager_unittest_target", 185 service_manager::Identity target("service_manager_unittest_target",
186 service_manager::mojom::kInheritUserID); 186 service_manager::mojom::kInheritUserID);
187 service_manager::Connector::ConnectParams params(target); 187 service_manager::Connector::ConnectParams params(target);
188 params.set_client_process_connection(std::move(client), 188 params.set_client_process_connection(std::move(client),
189 GetProxy(&receiver)); 189 MakeRequest(&receiver));
190 std::unique_ptr<service_manager::Connection> connection = 190 std::unique_ptr<service_manager::Connection> connection =
191 connector()->Connect(&params); 191 connector()->Connect(&params);
192 connection->AddConnectionCompletedClosure( 192 connection->AddConnectionCompletedClosure(
193 base::Bind(&ServiceManagerTest::OnConnectionCompleted, 193 base::Bind(&ServiceManagerTest::OnConnectionCompleted,
194 base::Unretained(this))); 194 base::Unretained(this)));
195 195
196 base::LaunchOptions options; 196 base::LaunchOptions options;
197 #if defined(OS_WIN) 197 #if defined(OS_WIN)
198 options.handles_to_inherit = &handle_passing_info; 198 options.handles_to_inherit = &handle_passing_info;
199 #elif defined(OS_POSIX) 199 #elif defined(OS_POSIX)
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 connector()->Connect("service_manager_unittest_singleton"); 359 connector()->Connect("service_manager_unittest_singleton");
360 loop.Run(); 360 loop.Run();
361 EXPECT_FALSE(failed_to_start); 361 EXPECT_FALSE(failed_to_start);
362 EXPECT_FALSE(singleton_connection->IsPending()); 362 EXPECT_FALSE(singleton_connection->IsPending());
363 EXPECT_EQ(1, start_count); 363 EXPECT_EQ(1, start_count);
364 EXPECT_EQ("service_manager_unittest_singleton", service_name); 364 EXPECT_EQ("service_manager_unittest_singleton", service_name);
365 } 365 }
366 } 366 }
367 367
368 } // namespace service_manager 368 } // namespace service_manager
OLDNEW
« no previous file with comments | « services/service_manager/tests/lifecycle/lifecycle_unittest.cc ('k') | services/service_manager/tests/util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698