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

Unified Diff: services/shell/tests/shutdown/shutdown_client_app.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
« no previous file with comments | « services/shell/tests/shutdown/OWNERS ('k') | services/shell/tests/shutdown/shutdown_client_manifest.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/shell/tests/shutdown/shutdown_client_app.cc
diff --git a/services/shell/tests/shutdown/shutdown_client_app.cc b/services/shell/tests/shutdown/shutdown_client_app.cc
deleted file mode 100644
index 5da8801417d1ab128a7ec6eb74f0814cd7466a0f..0000000000000000000000000000000000000000
--- a/services/shell/tests/shutdown/shutdown_client_app.cc
+++ /dev/null
@@ -1,73 +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 "base/macros.h"
-#include "base/run_loop.h"
-#include "mojo/public/cpp/bindings/binding_set.h"
-#include "services/shell/public/c/main.h"
-#include "services/shell/public/cpp/connector.h"
-#include "services/shell/public/cpp/interface_factory.h"
-#include "services/shell/public/cpp/interface_registry.h"
-#include "services/shell/public/cpp/service.h"
-#include "services/shell/public/cpp/service_runner.h"
-#include "services/shell/tests/shutdown/shutdown_unittest.mojom.h"
-
-namespace shell {
-
-class ShutdownClientApp
- : public Service,
- public InterfaceFactory<mojom::ShutdownTestClientController>,
- public mojom::ShutdownTestClientController,
- public mojom::ShutdownTestClient {
- public:
- ShutdownClientApp() {}
- ~ShutdownClientApp() override {}
-
- private:
- // shell::Service:
- bool OnConnect(const Identity& remote_identity,
- InterfaceRegistry* registry) override {
- registry->AddInterface<mojom::ShutdownTestClientController>(this);
- return true;
- }
-
- // InterfaceFactory<mojom::ShutdownTestClientController>:
- void Create(const Identity& remote_identity,
- mojom::ShutdownTestClientControllerRequest request) override {
- bindings_.AddBinding(this, std::move(request));
- }
-
- // mojom::ShutdownTestClientController:
- void ConnectAndWait(const ConnectAndWaitCallback& callback) override {
- mojom::ShutdownTestServicePtr service;
- connector()->ConnectToInterface("service:shutdown_service", &service);
-
- mojo::Binding<mojom::ShutdownTestClient> client_binding(this);
-
- mojom::ShutdownTestClientPtr client_ptr =
- client_binding.CreateInterfacePtrAndBind();
-
- service->SetClient(std::move(client_ptr));
-
- base::MessageLoop::ScopedNestableTaskAllower nestable_allower(
- base::MessageLoop::current());
- base::RunLoop run_loop;
- client_binding.set_connection_error_handler(run_loop.QuitClosure());
- run_loop.Run();
-
- callback.Run();
- }
-
- mojo::BindingSet<mojom::ShutdownTestClientController> bindings_;
-
- DISALLOW_COPY_AND_ASSIGN(ShutdownClientApp);
-};
-
-} // namespace shell
-
-
-MojoResult ServiceMain(MojoHandle service_request_handle) {
- shell::ServiceRunner runner(new shell::ShutdownClientApp);
- return runner.Run(service_request_handle);
-}
« no previous file with comments | « services/shell/tests/shutdown/OWNERS ('k') | services/shell/tests/shutdown/shutdown_client_manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698