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

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

Issue 687433002: Remove mojo/shell and (most) service implementations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove mojo/gles2, disable mojo apps in component build Created 6 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 | « mojo/services/test_service/test_service_impl.h ('k') | mojo/services/test_service/test_time_service_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/test_service/test_service_impl.cc
diff --git a/mojo/services/test_service/test_service_impl.cc b/mojo/services/test_service/test_service_impl.cc
deleted file mode 100644
index 073ccce904be15859e16674325df43e435db5ca9..0000000000000000000000000000000000000000
--- a/mojo/services/test_service/test_service_impl.cc
+++ /dev/null
@@ -1,66 +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_impl.h"
-
-#include "base/bind.h"
-#include "base/i18n/time_formatting.h"
-#include "base/strings/utf_string_conversions.h"
-#include "mojo/public/cpp/application/application_connection.h"
-#include "mojo/services/test_service/test_request_tracker_client_impl.h"
-#include "mojo/services/test_service/test_service_application.h"
-#include "mojo/services/test_service/test_time_service_impl.h"
-
-namespace mojo {
-namespace test {
-
-TestServiceImpl::TestServiceImpl(ApplicationConnection* connection,
- TestServiceApplication* application)
- : application_(application), connection_(connection) {
-}
-
-TestServiceImpl::~TestServiceImpl() {
-}
-
-void TestServiceImpl::OnConnectionEstablished() {
- application_->AddRef();
-}
-
-void TestServiceImpl::OnConnectionError() {
- application_->ReleaseRef();
-}
-
-void TestServiceImpl::Ping(const mojo::Callback<void()>& callback) {
- if (tracking_)
- tracking_->RecordNewRequest();
- callback.Run();
-}
-
-void SendTimeResponse(
- const mojo::Callback<void(int64_t)>& requestor_callback,
- int64_t time_usec) {
- requestor_callback.Run(time_usec);
-}
-
-void TestServiceImpl::ConnectToAppAndGetTime(
- const mojo::String& app_url,
- const mojo::Callback<void(int64_t)>& callback) {
- connection_->ConnectToService(app_url, &time_service_);
- if (tracking_) {
- tracking_->RecordNewRequest();
- time_service_->StartTrackingRequests(mojo::Callback<void()>());
- }
- time_service_->GetPartyTime(base::Bind(&SendTimeResponse, callback));
-}
-
-void TestServiceImpl::StartTrackingRequests(
- const mojo::Callback<void()>& callback) {
- TestRequestTrackerPtr tracker;
- connection_->ConnectToService("mojo:test_request_tracker_app", &tracker);
- tracking_.reset(
- new TestRequestTrackerClientImpl(tracker.Pass(), Name_, callback));
-}
-
-} // namespace test
-} // namespace mojo
« no previous file with comments | « mojo/services/test_service/test_service_impl.h ('k') | mojo/services/test_service/test_time_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698