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

Unified Diff: services/shell/background/tests/test_service.cc

Issue 2419723002: Move services/shell to services/service_manager (Closed)
Patch Set: rebase Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: services/shell/background/tests/test_service.cc
diff --git a/services/shell/background/tests/test_service.cc b/services/shell/background/tests/test_service.cc
deleted file mode 100644
index cde26bbfa6a08c5301dbf61a6a2d32c2c96146db..0000000000000000000000000000000000000000
--- a/services/shell/background/tests/test_service.cc
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "mojo/public/cpp/bindings/binding_set.h"
-#include "services/shell/background/tests/test.mojom.h"
-#include "services/shell/public/c/main.h"
-#include "services/shell/public/cpp/interface_registry.h"
-#include "services/shell/public/cpp/service.h"
-#include "services/shell/public/cpp/service_runner.h"
-
-namespace shell {
-
-class TestClient : public Service,
- public InterfaceFactory<mojom::TestService>,
- public mojom::TestService {
- public:
- TestClient() {}
- ~TestClient() override {}
-
- private:
- // Service:
- bool OnConnect(const Identity& remote_identity,
- InterfaceRegistry* registry) override {
- registry->AddInterface(this);
- return true;
- }
- bool OnStop() override {
- return true;
- }
-
- // InterfaceFactory<mojom::TestService>:
- void Create(const Identity& remote_identity,
- mojo::InterfaceRequest<mojom::TestService> request) override {
- bindings_.AddBinding(this, std::move(request));
- }
-
- // mojom::TestService
- void Test(const TestCallback& callback) override {
- callback.Run();
- }
-
- mojo::BindingSet<mojom::TestService> bindings_;
-
- DISALLOW_COPY_AND_ASSIGN(TestClient);
-};
-
-} // namespace shell
-
-MojoResult ServiceMain(MojoHandle service_request_handle) {
- shell::ServiceRunner runner(new shell::TestClient);
- return runner.Run(service_request_handle);
-}
« no previous file with comments | « services/shell/background/tests/test_manifest.json ('k') | services/shell/background/tests/test_service_manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698