| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |