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

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

Issue 2215133002: Change signature of OnConnect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cleanup
Patch Set: . Created 4 years, 4 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 #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 shell::Service, 25 class Driver : public shell::Service,
26 public shell::InterfaceFactory<ClientProcessTest>, 26 public shell::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 // shell::Service: 33 // shell::Service:
34 bool OnConnect(shell::Connection* connection) override { 34 bool OnConnect(const shell::Identity& remote_identity,
35 connection->AddInterface<ClientProcessTest>(this); 35 shell::InterfaceRegistry* registry) override {
36 registry->AddInterface<ClientProcessTest>(this);
36 return true; 37 return true;
37 } 38 }
38 bool OnStop() override { 39 bool OnStop() override {
39 // 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
40 // override entirely. 41 // override entirely.
41 _exit(1); 42 _exit(1);
42 } 43 }
43 44
44 // shell::InterfaceFactory<ConnectTestService>: 45 // shell::InterfaceFactory<ConnectTestService>:
45 void Create(const shell::Identity& remote_identity, 46 void Create(const shell::Identity& remote_identity,
(...skipping 28 matching lines...) Expand all
74 75
75 int main(int argc, char** argv) { 76 int main(int argc, char** argv) {
76 base::AtExitManager at_exit; 77 base::AtExitManager at_exit;
77 base::CommandLine::Init(argc, argv); 78 base::CommandLine::Init(argc, argv);
78 79
79 shell::InitializeLogging(); 80 shell::InitializeLogging();
80 81
81 Driver driver; 82 Driver driver;
82 return shell::TestNativeMain(&driver); 83 return shell::TestNativeMain(&driver);
83 } 84 }
OLDNEW
« no previous file with comments | « services/shell/tests/connect/connect_test_class_app.cc ('k') | services/shell/tests/connect/connect_test_exe.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698