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

Side by Side Diff: services/device/device_service_test_base.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
« no previous file with comments | « services/device/device_service.cc ('k') | services/file/file_service.h » ('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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 "services/device/device_service_test_base.h" 5 #include "services/device/device_service_test_base.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/threading/thread.h" 10 #include "base/threading/thread.h"
(...skipping 19 matching lines...) Expand all
30 public: 30 public:
31 explicit ServiceTestClient(service_manager::test::ServiceTest* test) 31 explicit ServiceTestClient(service_manager::test::ServiceTest* test)
32 : service_manager::test::ServiceTestClient(test), 32 : service_manager::test::ServiceTestClient(test),
33 io_thread_("DeviceServiceTestIOThread"), 33 io_thread_("DeviceServiceTestIOThread"),
34 file_thread_("DeviceServiceTestFileThread") { 34 file_thread_("DeviceServiceTestFileThread") {
35 registry_.AddInterface<service_manager::mojom::ServiceFactory>(this); 35 registry_.AddInterface<service_manager::mojom::ServiceFactory>(this);
36 } 36 }
37 ~ServiceTestClient() override {} 37 ~ServiceTestClient() override {}
38 38
39 protected: 39 protected:
40 void OnBindInterface(const service_manager::ServiceInfo& source_info, 40 void OnBindInterface(const service_manager::BindSourceInfo& source_info,
41 const std::string& interface_name, 41 const std::string& interface_name,
42 mojo::ScopedMessagePipeHandle interface_pipe) override { 42 mojo::ScopedMessagePipeHandle interface_pipe) override {
43 registry_.BindInterface(source_info.identity, interface_name, 43 registry_.BindInterface(source_info.identity, interface_name,
44 std::move(interface_pipe)); 44 std::move(interface_pipe));
45 } 45 }
46 46
47 void CreateService(service_manager::mojom::ServiceRequest request, 47 void CreateService(service_manager::mojom::ServiceRequest request,
48 const std::string& name) override { 48 const std::string& name) override {
49 if (name == device::mojom::kServiceName) { 49 if (name == device::mojom::kServiceName) {
50 io_thread_.Start(); 50 io_thread_.Start();
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 : ServiceTest(kTestServiceName) {} 86 : ServiceTest(kTestServiceName) {}
87 87
88 DeviceServiceTestBase::~DeviceServiceTestBase() {} 88 DeviceServiceTestBase::~DeviceServiceTestBase() {}
89 89
90 std::unique_ptr<service_manager::Service> 90 std::unique_ptr<service_manager::Service>
91 DeviceServiceTestBase::CreateService() { 91 DeviceServiceTestBase::CreateService() {
92 return base::MakeUnique<ServiceTestClient>(this); 92 return base::MakeUnique<ServiceTestClient>(this);
93 } 93 }
94 94
95 } // namespace device 95 } // namespace device
OLDNEW
« no previous file with comments | « services/device/device_service.cc ('k') | services/file/file_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698