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

Unified Diff: chromeos/dbus/fake_arc_instance_client.cc

Issue 1421023002: Remove the ARC Bridge Service (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: Removed the bool callback for StartInstance Created 5 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: chromeos/dbus/fake_arc_instance_client.cc
diff --git a/chromeos/dbus/fake_arc_instance_client.cc b/chromeos/dbus/fake_arc_instance_client.cc
new file mode 100644
index 0000000000000000000000000000000000000000..c04df57ba5aa05257e6c992767450c72873e499a
--- /dev/null
+++ b/chromeos/dbus/fake_arc_instance_client.cc
@@ -0,0 +1,46 @@
+// Copyright 2015 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 "chromeos/dbus/fake_arc_instance_client.h"
+
+#include "base/bind.h"
+#include "base/location.h"
+#include "base/single_thread_task_runner.h"
+#include "base/thread_task_runner_handle.h"
+
+namespace chromeos {
+
+namespace {
+
+void OnVoidDBusMethod(const VoidDBusMethodCallback& callback) {
+ callback.Run(DBUS_METHOD_CALL_SUCCESS);
+}
+
+void OnVoidDBusMethodFailure(const VoidDBusMethodCallback& callback) {
+ callback.Run(DBUS_METHOD_CALL_FAILURE);
+}
+
+} // anonymous namespace
+
+FakeArcInstanceClient::FakeArcInstanceClient() {}
+
+FakeArcInstanceClient::~FakeArcInstanceClient() {}
+
+void FakeArcInstanceClient::Init(dbus::Bus* bus) {}
+
+void FakeArcInstanceClient::StartInstance(
+ const std::string& socket_path,
+ const VoidDBusMethodCallback& callback) {
+ // Return a failure to signal that the service is unavailable.
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(&OnVoidDBusMethodFailure, callback));
+}
+
+void FakeArcInstanceClient::StopInstance(
+ const VoidDBusMethodCallback& callback) {
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(&OnVoidDBusMethod, callback));
+}
+
+} // namespace chromeos
« chromeos/dbus/arc_instance_client.h ('K') | « chromeos/dbus/fake_arc_instance_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698