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

Side by Side Diff: services/service_manager/public/cpp/lib/service_test.cc

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 #include "services/service_manager/public/cpp/service_test.h" 5 #include "services/service_manager/public/cpp/service_test.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "services/service_manager/background/background_service_manager.h" 10 #include "services/service_manager/background/background_service_manager.h"
11 #include "services/service_manager/public/cpp/service.h" 11 #include "services/service_manager/public/cpp/service.h"
12 #include "services/service_manager/public/cpp/service_context.h" 12 #include "services/service_manager/public/cpp/service_context.h"
13 13
14 namespace service_manager { 14 namespace service_manager {
15 namespace test { 15 namespace test {
16 16
17 ServiceTestClient::ServiceTestClient(ServiceTest* test) : test_(test) {} 17 ServiceTestClient::ServiceTestClient(ServiceTest* test) : test_(test) {}
18 18
19 ServiceTestClient::~ServiceTestClient() {} 19 ServiceTestClient::~ServiceTestClient() {}
20 20
21 void ServiceTestClient::OnStart(ServiceContext* context) { 21 void ServiceTestClient::OnStart() {
22 test_->OnStartCalled(context->connector(), context->identity().name(), 22 test_->OnStartCalled(context()->connector(), context()->identity().name(),
23 context->identity().user_id()); 23 context()->identity().user_id());
24 } 24 }
25 25
26 bool ServiceTestClient::OnConnect(const ServiceInfo& remote_info, 26 bool ServiceTestClient::OnConnect(const ServiceInfo& remote_info,
27 InterfaceRegistry* registry) { 27 InterfaceRegistry* registry) {
28 return false; 28 return false;
29 } 29 }
30 30
31 31
32 ServiceTest::ServiceTest() {} 32 ServiceTest::ServiceTest() {}
33 33
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 } 80 }
81 81
82 void ServiceTest::TearDown() { 82 void ServiceTest::TearDown() {
83 background_service_manager_.reset(); 83 background_service_manager_.reset();
84 message_loop_.reset(); 84 message_loop_.reset();
85 context_.reset(); 85 context_.reset();
86 } 86 }
87 87
88 } // namespace test 88 } // namespace test
89 } // namespace service_manager 89 } // namespace service_manager
OLDNEW
« no previous file with comments | « services/service_manager/public/cpp/lib/service_context.cc ('k') | services/service_manager/public/cpp/service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698