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

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

Issue 2850743004: Replace ServiceInfo with BindSourceInfo. (Closed)
Patch Set: . Created 3 years, 7 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 class TestService : public test::ServiceTestClient { 110 class TestService : public test::ServiceTestClient {
111 public: 111 public:
112 explicit TestService(ConnectTest* connect_test) 112 explicit TestService(ConnectTest* connect_test)
113 : test::ServiceTestClient(connect_test), connect_test_(connect_test) { 113 : test::ServiceTestClient(connect_test), connect_test_(connect_test) {
114 registry_.AddInterface<test::mojom::ExposedInterface>(connect_test_); 114 registry_.AddInterface<test::mojom::ExposedInterface>(connect_test_);
115 } 115 }
116 ~TestService() override {} 116 ~TestService() override {}
117 117
118 private: 118 private:
119 void OnBindInterface( 119 void OnBindInterface(
120 const ServiceInfo& source_info, 120 const BindSourceInfo& source_info,
121 const std::string& interface_name, 121 const std::string& interface_name,
122 mojo::ScopedMessagePipeHandle interface_pipe) override { 122 mojo::ScopedMessagePipeHandle interface_pipe) override {
123 registry_.BindInterface(source_info.identity, interface_name, 123 registry_.BindInterface(source_info.identity, interface_name,
124 std::move(interface_pipe)); 124 std::move(interface_pipe));
125 } 125 }
126 126
127 ConnectTest* connect_test_; 127 ConnectTest* connect_test_;
128 BinderRegistry registry_; 128 BinderRegistry registry_;
129 129
130 DISALLOW_COPY_AND_ASSIGN(TestService); 130 DISALLOW_COPY_AND_ASSIGN(TestService);
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 Connector::TestApi test_api(connector()); 383 Connector::TestApi test_api(connector());
384 Identity resolved_identity; 384 Identity resolved_identity;
385 test_api.SetStartServiceCallback( 385 test_api.SetStartServiceCallback(
386 base::Bind(&StartServiceResponse, &loop, nullptr, &resolved_identity)); 386 base::Bind(&StartServiceResponse, &loop, nullptr, &resolved_identity));
387 loop.Run(); 387 loop.Run();
388 EXPECT_EQ(resolved_identity.user_id(), first_resolved_identity.user_id()); 388 EXPECT_EQ(resolved_identity.user_id(), first_resolved_identity.user_id());
389 } 389 }
390 } 390 }
391 391
392 } // namespace service_manager 392 } // namespace service_manager
OLDNEW
« no previous file with comments | « services/service_manager/tests/connect/connect_test_package.cc ('k') | services/service_manager/tests/lifecycle/app_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698