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

Side by Side Diff: services/shell/tests/connect/connect_unittest.cc

Issue 2182643003: Remove shell::Connection* parameter to InterfaceFactory<T>::Create() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
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 <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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 connector()->Connect(kTestPackageName); 119 connector()->Connect(kTestPackageName);
120 connection->GetInterface(&root_service); 120 connection->GetInterface(&root_service);
121 base::RunLoop run_loop; 121 base::RunLoop run_loop;
122 std::string root_name; 122 std::string root_name;
123 root_service->GetTitle( 123 root_service->GetTitle(
124 base::Bind(&ReceiveOneString, &root_name, &run_loop)); 124 base::Bind(&ReceiveOneString, &root_name, &run_loop));
125 run_loop.Run(); 125 run_loop.Run();
126 } 126 }
127 127
128 // InterfaceFactory<test::mojom::ExposedInterface>: 128 // InterfaceFactory<test::mojom::ExposedInterface>:
129 void Create(Connection* connection, 129 void Create(const Identity& remote_identity,
130 test::mojom::ExposedInterfaceRequest request) override { 130 test::mojom::ExposedInterfaceRequest request) override {
131 bindings_.AddBinding(this, std::move(request)); 131 bindings_.AddBinding(this, std::move(request));
132 } 132 }
133 133
134 void ConnectionAccepted(test::mojom::ConnectionStatePtr state) override { 134 void ConnectionAccepted(test::mojom::ConnectionStatePtr state) override {
135 connection_state_ = std::move(state); 135 connection_state_ = std::move(state);
136 ping_callback_.Run(); 136 ping_callback_.Run();
137 } 137 }
138 138
139 base::Closure ping_callback_; 139 base::Closure ping_callback_;
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 run_loop.Run(); 463 run_loop.Run();
464 CompareConnectionState( 464 CompareConnectionState(
465 kTestAppAName, test_name(), test_userid(), test_instance_id(), 465 kTestAppAName, test_name(), test_userid(), test_instance_id(),
466 kTestAppAName, connection->GetRemoteIdentity().user_id(), remote_id); 466 kTestAppAName, connection->GetRemoteIdentity().user_id(), remote_id);
467 } 467 }
468 468
469 } 469 }
470 } 470 }
471 471
472 } // namespace shell 472 } // namespace shell
OLDNEW
« no previous file with comments | « services/shell/tests/connect/connect_test_package.cc ('k') | services/shell/tests/lifecycle/app_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698