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

Side by Side Diff: chrome/test/base/mojo_test_connector.cc

Issue 2480603004: Service Manager: Implement graceful service termination (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 "chrome/test/base/mojo_test_connector.h" 5 #include "chrome/test/base/mojo_test_connector.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 10 matching lines...) Expand all
21 #include "services/catalog/store.h" 21 #include "services/catalog/store.h"
22 #include "services/service_manager/native_runner_delegate.h" 22 #include "services/service_manager/native_runner_delegate.h"
23 #include "services/service_manager/public/cpp/connector.h" 23 #include "services/service_manager/public/cpp/connector.h"
24 #include "services/service_manager/public/cpp/service.h" 24 #include "services/service_manager/public/cpp/service.h"
25 #include "services/service_manager/public/cpp/service_context.h" 25 #include "services/service_manager/public/cpp/service_context.h"
26 #include "services/service_manager/runner/common/client_util.h" 26 #include "services/service_manager/runner/common/client_util.h"
27 #include "services/service_manager/runner/common/switches.h" 27 #include "services/service_manager/runner/common/switches.h"
28 #include "services/service_manager/service_manager.h" 28 #include "services/service_manager/service_manager.h"
29 #include "services/service_manager/switches.h" 29 #include "services/service_manager/switches.h"
30 30
31 using service_manager::mojom::Service;
32 using service_manager::mojom::ServicePtr;
33
34 namespace { 31 namespace {
35 32
36 const char kTestRunnerName[] = "exe:mash_browser_tests"; 33 const char kTestRunnerName[] = "exe:mash_browser_tests";
37 const char kTestName[] = "service:content_browser"; 34 const char kTestName[] = "service:content_browser";
38 35
39 // BackgroundTestState maintains all the state necessary to bind the test to 36 // BackgroundTestState maintains all the state necessary to bind the test to
40 // mojo. This class is only used on the thread created by 37 // mojo. This class is only used on the thread created by
41 // BackgroundServiceManager. 38 // BackgroundServiceManager.
42 class BackgroundTestState { 39 class BackgroundTestState {
43 public: 40 public:
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 MojoTestConnector::~MojoTestConnector() {} 254 MojoTestConnector::~MojoTestConnector() {}
258 255
259 std::unique_ptr<content::TestState> MojoTestConnector::PrepareForTest( 256 std::unique_ptr<content::TestState> MojoTestConnector::PrepareForTest(
260 base::CommandLine* command_line, 257 base::CommandLine* command_line,
261 base::TestLauncher::LaunchOptions* test_launch_options) { 258 base::TestLauncher::LaunchOptions* test_launch_options) {
262 std::unique_ptr<MojoTestState> test_state( 259 std::unique_ptr<MojoTestState> test_state(
263 new MojoTestState(&background_service_manager_)); 260 new MojoTestState(&background_service_manager_));
264 test_state->Init(command_line, test_launch_options); 261 test_state->Init(command_line, test_launch_options);
265 return std::move(test_state); 262 return std::move(test_state);
266 } 263 }
OLDNEW
« no previous file with comments | « no previous file | services/service_manager/public/cpp/lib/service_context.cc » ('j') | services/service_manager/service_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698