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

Side by Side Diff: services/service_manager/public/cpp/service_test.h

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 #ifndef SERVICES_SERVICE_MANAGER_PUBLIC_CPP_SERVICE_TEST_H_ 5 #ifndef SERVICES_SERVICE_MANAGER_PUBLIC_CPP_SERVICE_TEST_H_
6 #define SERVICES_SERVICE_MANAGER_PUBLIC_CPP_SERVICE_TEST_H_ 6 #define SERVICES_SERVICE_MANAGER_PUBLIC_CPP_SERVICE_TEST_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 25 matching lines...) Expand all
36 // to customize this should subclass this class instead of Service, 36 // to customize this should subclass this class instead of Service,
37 // otherwise they will have to call ServiceTest::OnStartCalled() to forward 37 // otherwise they will have to call ServiceTest::OnStartCalled() to forward
38 // metadata from OnStart() to the test. 38 // metadata from OnStart() to the test.
39 class ServiceTestClient : public Service { 39 class ServiceTestClient : public Service {
40 public: 40 public:
41 explicit ServiceTestClient(ServiceTest* test); 41 explicit ServiceTestClient(ServiceTest* test);
42 ~ServiceTestClient() override; 42 ~ServiceTestClient() override;
43 43
44 protected: 44 protected:
45 void OnStart() override; 45 void OnStart() override;
46 void OnBindInterface(const ServiceInfo& source_info, 46 void OnBindInterface(const BindSourceInfo& source_info,
47 const std::string& interface_name, 47 const std::string& interface_name,
48 mojo::ScopedMessagePipeHandle interface_pipe) override; 48 mojo::ScopedMessagePipeHandle interface_pipe) override;
49 49
50 private: 50 private:
51 ServiceTest* test_; 51 ServiceTest* test_;
52 52
53 DISALLOW_COPY_AND_ASSIGN(ServiceTestClient); 53 DISALLOW_COPY_AND_ASSIGN(ServiceTestClient);
54 }; 54 };
55 55
56 class ServiceTest : public testing::Test { 56 class ServiceTest : public testing::Test {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 111
112 base::Closure initialize_called_; 112 base::Closure initialize_called_;
113 113
114 DISALLOW_COPY_AND_ASSIGN(ServiceTest); 114 DISALLOW_COPY_AND_ASSIGN(ServiceTest);
115 }; 115 };
116 116
117 } // namespace test 117 } // namespace test
118 } // namespace service_manager 118 } // namespace service_manager
119 119
120 #endif // SERVICES_SERVICE_MANAGER_PUBLIC_CPP_SERVICE_TEST_H_ 120 #endif // SERVICES_SERVICE_MANAGER_PUBLIC_CPP_SERVICE_TEST_H_
OLDNEW
« no previous file with comments | « services/service_manager/public/cpp/service_info_struct_traits.h ('k') | services/service_manager/public/cpp/typemaps.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698