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

Side by Side Diff: services/service_manager/tests/connect/connect_test_driver.cc

Issue 2435153004: Change Service contract to pass ServiceInfo instead of Identity (Closed)
Patch Set: . 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 <memory> 5 #include <memory>
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/process/process.h" 10 #include "base/process/process.h"
(...skipping 13 matching lines...) Expand all
24 24
25 class Driver : public service_manager::Service, 25 class Driver : public service_manager::Service,
26 public service_manager::InterfaceFactory<ClientProcessTest>, 26 public service_manager::InterfaceFactory<ClientProcessTest>,
27 public ClientProcessTest { 27 public ClientProcessTest {
28 public: 28 public:
29 Driver() {} 29 Driver() {}
30 ~Driver() override {} 30 ~Driver() override {}
31 31
32 private: 32 private:
33 // service_manager::Service: 33 // service_manager::Service:
34 bool OnConnect(const service_manager::Identity& remote_identity, 34 bool OnConnect(const service_manager::ServiceInfo& remote_info,
35 service_manager::InterfaceRegistry* registry) override { 35 service_manager::InterfaceRegistry* registry) override {
36 registry->AddInterface<ClientProcessTest>(this); 36 registry->AddInterface<ClientProcessTest>(this);
37 return true; 37 return true;
38 } 38 }
39 bool OnStop() override { 39 bool OnStop() override {
40 // TODO(rockot): http://crbug.com/596621. Should be able to remove this 40 // TODO(rockot): http://crbug.com/596621. Should be able to remove this
41 // override entirely. 41 // override entirely.
42 _exit(1); 42 _exit(1);
43 } 43 }
44 44
(...skipping 30 matching lines...) Expand all
75 75
76 int main(int argc, char** argv) { 76 int main(int argc, char** argv) {
77 base::AtExitManager at_exit; 77 base::AtExitManager at_exit;
78 base::CommandLine::Init(argc, argv); 78 base::CommandLine::Init(argc, argv);
79 79
80 service_manager::InitializeLogging(); 80 service_manager::InitializeLogging();
81 81
82 Driver driver; 82 Driver driver;
83 return service_manager::TestNativeMain(&driver); 83 return service_manager::TestNativeMain(&driver);
84 } 84 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698