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

Side by Side 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, 1 month 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chromeos/dbus/fake_arc_instance_client.h"
6
7 #include "base/bind.h"
8 #include "base/location.h"
9 #include "base/single_thread_task_runner.h"
10 #include "base/thread_task_runner_handle.h"
11
12 namespace chromeos {
13
14 namespace {
15
16 void OnVoidDBusMethod(const VoidDBusMethodCallback& callback) {
17 callback.Run(DBUS_METHOD_CALL_SUCCESS);
18 }
19
20 void OnVoidDBusMethodFailure(const VoidDBusMethodCallback& callback) {
21 callback.Run(DBUS_METHOD_CALL_FAILURE);
22 }
23
24 } // anonymous namespace
25
26 FakeArcInstanceClient::FakeArcInstanceClient() {}
27
28 FakeArcInstanceClient::~FakeArcInstanceClient() {}
29
30 void FakeArcInstanceClient::Init(dbus::Bus* bus) {}
31
32 void FakeArcInstanceClient::StartInstance(
33 const std::string& socket_path,
34 const VoidDBusMethodCallback& callback) {
35 // Return a failure to signal that the service is unavailable.
36 base::ThreadTaskRunnerHandle::Get()->PostTask(
37 FROM_HERE, base::Bind(&OnVoidDBusMethodFailure, callback));
38 }
39
40 void FakeArcInstanceClient::StopInstance(
41 const VoidDBusMethodCallback& callback) {
42 base::ThreadTaskRunnerHandle::Get()->PostTask(
43 FROM_HERE, base::Bind(&OnVoidDBusMethod, callback));
44 }
45
46 } // namespace chromeos
OLDNEW
« 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