| OLD | NEW |
| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 100 |
| 101 private: | 101 private: |
| 102 class TestService : public test::ServiceTestClient { | 102 class TestService : public test::ServiceTestClient { |
| 103 public: | 103 public: |
| 104 explicit TestService(ConnectTest* connect_test) | 104 explicit TestService(ConnectTest* connect_test) |
| 105 : test::ServiceTestClient(connect_test), | 105 : test::ServiceTestClient(connect_test), |
| 106 connect_test_(connect_test) {} | 106 connect_test_(connect_test) {} |
| 107 ~TestService() override {} | 107 ~TestService() override {} |
| 108 | 108 |
| 109 private: | 109 private: |
| 110 bool OnConnect(const Identity& remote_identity, | 110 bool OnConnect(const ServiceInfo& remote_info, |
| 111 InterfaceRegistry* registry) override { | 111 InterfaceRegistry* registry) override { |
| 112 registry->AddInterface<test::mojom::ExposedInterface>(connect_test_); | 112 registry->AddInterface<test::mojom::ExposedInterface>(connect_test_); |
| 113 return true; | 113 return true; |
| 114 } | 114 } |
| 115 | 115 |
| 116 ConnectTest* connect_test_; | 116 ConnectTest* connect_test_; |
| 117 | 117 |
| 118 DISALLOW_COPY_AND_ASSIGN(TestService); | 118 DISALLOW_COPY_AND_ASSIGN(TestService); |
| 119 }; | 119 }; |
| 120 | 120 |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 base::RunLoop loop; | 410 base::RunLoop loop; |
| 411 inherit_connection->AddConnectionCompletedClosure( | 411 inherit_connection->AddConnectionCompletedClosure( |
| 412 base::Bind(&QuitLoop, &loop)); | 412 base::Bind(&QuitLoop, &loop)); |
| 413 loop.Run(); | 413 loop.Run(); |
| 414 EXPECT_EQ(inherit_connection->GetRemoteIdentity().user_id(), | 414 EXPECT_EQ(inherit_connection->GetRemoteIdentity().user_id(), |
| 415 connection->GetRemoteIdentity().user_id()); | 415 connection->GetRemoteIdentity().user_id()); |
| 416 } | 416 } |
| 417 } | 417 } |
| 418 | 418 |
| 419 } // namespace service_manager | 419 } // namespace service_manager |
| OLD | NEW |