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

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

Issue 2487573002: Service Manager: Remove ServiceContext* arg from Service::OnStart() (Closed)
Patch Set: rebase Created 4 years, 1 month 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 17 matching lines...) Expand all
28 // A default implementation of Service for use in ServiceTests. Tests wishing 28 // A default implementation of Service for use in ServiceTests. Tests wishing
29 // to customize this should subclass this class instead of Service, 29 // to customize this should subclass this class instead of Service,
30 // otherwise they will have to call ServiceTest::OnStartCalled() to forward 30 // otherwise they will have to call ServiceTest::OnStartCalled() to forward
31 // metadata from OnStart() to the test. 31 // metadata from OnStart() to the test.
32 class ServiceTestClient : public Service { 32 class ServiceTestClient : public Service {
33 public: 33 public:
34 explicit ServiceTestClient(ServiceTest* test); 34 explicit ServiceTestClient(ServiceTest* test);
35 ~ServiceTestClient() override; 35 ~ServiceTestClient() override;
36 36
37 protected: 37 protected:
38 void OnStart(ServiceContext* context) override; 38 void OnStart() override;
39 bool OnConnect(const ServiceInfo& remote_info, 39 bool OnConnect(const ServiceInfo& remote_info,
40 InterfaceRegistry* registry) override; 40 InterfaceRegistry* registry) override;
41 41
42 private: 42 private:
43 ServiceTest* test_; 43 ServiceTest* test_;
44 44
45 DISALLOW_COPY_AND_ASSIGN(ServiceTestClient); 45 DISALLOW_COPY_AND_ASSIGN(ServiceTestClient);
46 }; 46 };
47 47
48 class ServiceTest : public testing::Test { 48 class ServiceTest : public testing::Test {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 base::Closure initialize_called_; 101 base::Closure initialize_called_;
102 102
103 DISALLOW_COPY_AND_ASSIGN(ServiceTest); 103 DISALLOW_COPY_AND_ASSIGN(ServiceTest);
104 }; 104 };
105 105
106 } // namespace test 106 } // namespace test
107 } // namespace service_manager 107 } // namespace service_manager
108 108
109 #endif // SERVICES_SERVICE_MANAGER_PUBLIC_CPP_SERVICE_TEST_H_ 109 #endif // SERVICES_SERVICE_MANAGER_PUBLIC_CPP_SERVICE_TEST_H_
OLDNEW
« no previous file with comments | « services/service_manager/public/cpp/service.h ('k') | services/service_manager/tests/connect/connect_test_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698