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

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

Issue 2182643003: Remove shell::Connection* parameter to InterfaceFactory<T>::Create() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 29 matching lines...) Expand all
40 connection->AddInterface<ClientProcessTest>(this); 40 connection->AddInterface<ClientProcessTest>(this);
41 return true; 41 return true;
42 } 42 }
43 bool OnStop() override { 43 bool OnStop() override {
44 // TODO(rockot): http://crbug.com/596621. Should be able to remove this 44 // TODO(rockot): http://crbug.com/596621. Should be able to remove this
45 // override entirely. 45 // override entirely.
46 _exit(1); 46 _exit(1);
47 } 47 }
48 48
49 // shell::InterfaceFactory<ConnectTestService>: 49 // shell::InterfaceFactory<ConnectTestService>:
50 void Create(shell::Connection* connection, 50 void Create(const shell::Identity& remote_identity,
51 ClientProcessTestRequest request) override { 51 ClientProcessTestRequest request) override {
52 bindings_.AddBinding(this, std::move(request)); 52 bindings_.AddBinding(this, std::move(request));
53 } 53 }
54 54
55 // test::mojom::ClientProcessTest: 55 // test::mojom::ClientProcessTest:
56 void LaunchAndConnectToProcess( 56 void LaunchAndConnectToProcess(
57 const LaunchAndConnectToProcessCallback& callback) override { 57 const LaunchAndConnectToProcessCallback& callback) override {
58 base::Process process; 58 base::Process process;
59 std::unique_ptr<shell::Connection> connection = 59 std::unique_ptr<shell::Connection> connection =
60 shell::test::LaunchAndConnectToProcess( 60 shell::test::LaunchAndConnectToProcess(
(...skipping 19 matching lines...) Expand all
80 80
81 int main(int argc, char** argv) { 81 int main(int argc, char** argv) {
82 base::AtExitManager at_exit; 82 base::AtExitManager at_exit;
83 base::CommandLine::Init(argc, argv); 83 base::CommandLine::Init(argc, argv);
84 84
85 shell::InitializeLogging(); 85 shell::InitializeLogging();
86 86
87 Driver driver; 87 Driver driver;
88 return shell::TestNativeMain(&driver); 88 return shell::TestNativeMain(&driver);
89 } 89 }
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