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

Unified Diff: mojo/services/test_service/test_service_application.cc

Issue 1760383002: Remove some unneeded directories (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: , Created 4 years, 10 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: mojo/services/test_service/test_service_application.cc
diff --git a/mojo/services/test_service/test_service_application.cc b/mojo/services/test_service/test_service_application.cc
deleted file mode 100644
index 1274c3e0c22d3ebc04a792aded4722ed7cdf87a4..0000000000000000000000000000000000000000
--- a/mojo/services/test_service/test_service_application.cc
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2014 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/services/test_service/test_service_application.h"
-
-#include <assert.h>
-#include <utility>
-
-#include "mojo/public/c/system/main.h"
-#include "mojo/services/test_service/test_service_impl.h"
-#include "mojo/services/test_service/test_time_service_impl.h"
-#include "mojo/shell/public/cpp/application_runner.h"
-#include "mojo/shell/public/cpp/connection.h"
-
-namespace mojo {
-namespace test {
-
-TestServiceApplication::TestServiceApplication()
- : ref_count_(0), connector_(nullptr) {
-}
-
-TestServiceApplication::~TestServiceApplication() {
-}
-
-void TestServiceApplication::Initialize(Connector* connector,
- const std::string& url,
- uint32_t id, uint32_t user_id) {
- connector_ = connector;
-}
-
-bool TestServiceApplication::AcceptConnection(Connection* connection) {
- connection->AddInterface<TestService>(this);
- connection->AddInterface<TestTimeService>(this);
- return true;
-}
-
-void TestServiceApplication::Create(Connection* connection,
- InterfaceRequest<TestService> request) {
- new TestServiceImpl(connector_, this, std::move(request));
- AddRef();
-}
-
-void TestServiceApplication::Create(Connection* connection,
- InterfaceRequest<TestTimeService> request) {
- new TestTimeServiceImpl(connector_, std::move(request));
-}
-
-void TestServiceApplication::AddRef() {
- assert(ref_count_ >= 0);
- ref_count_++;
-}
-
-void TestServiceApplication::ReleaseRef() {
- assert(ref_count_ > 0);
- ref_count_--;
- if (ref_count_ <= 0)
- base::MessageLoop::current()->QuitWhenIdle();
-}
-
-} // namespace test
-} // namespace mojo
-
-MojoResult MojoMain(MojoHandle shell_handle) {
- mojo::ApplicationRunner runner(new mojo::test::TestServiceApplication);
- return runner.Run(shell_handle);
-}
« no previous file with comments | « mojo/services/test_service/test_service_application.h ('k') | mojo/services/test_service/test_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698