OLD | NEW |
---|---|
(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_leadership_daemon_manager_client.h" | |
6 | |
7 #include "base/message_loop/message_loop.h" | |
8 | |
9 namespace chromeos { | |
10 | |
11 namespace { | |
stevenjb
2015/02/13 18:53:19
bit: blank line here
| |
12 void StringDBBusMethodCallbackThunk(const StringDBusMethodCallback& callback) { | |
13 callback.Run(DBUS_METHOD_CALL_SUCCESS, std::string()); | |
14 } | |
15 | |
16 void VoidDBBusMethodCallbackThunk(const VoidDBusMethodCallback& callback) { | |
17 callback.Run(DBUS_METHOD_CALL_SUCCESS); | |
18 } | |
19 } | |
stevenjb
2015/02/13 18:53:19
nit: // namespace + blank line before
| |
20 | |
21 FakeLeadershipDaemonManagerClient::FakeLeadershipDaemonManagerClient() { | |
22 } | |
23 | |
24 FakeLeadershipDaemonManagerClient::~FakeLeadershipDaemonManagerClient() { | |
25 } | |
26 | |
27 void FakeLeadershipDaemonManagerClient::Init(dbus::Bus* bus) { | |
28 } | |
29 | |
30 void FakeLeadershipDaemonManagerClient::AddObserver(Observer* observer) { | |
31 } | |
32 | |
33 void FakeLeadershipDaemonManagerClient::RemoveObserver(Observer* observer) { | |
34 } | |
35 | |
36 void FakeLeadershipDaemonManagerClient::JoinGroup( | |
37 const std::string& group, | |
38 const base::DictionaryValue& options, | |
39 const StringDBusMethodCallback& callback) { | |
40 base::MessageLoop::current()->PostTask( | |
41 FROM_HERE, base::Bind(&StringDBBusMethodCallbackThunk, callback)); | |
42 } | |
43 | |
44 void FakeLeadershipDaemonManagerClient::LeaveGroup( | |
45 const std::string& object_path, | |
46 const VoidDBusMethodCallback& callback) { | |
47 base::MessageLoop::current()->PostTask( | |
48 FROM_HERE, base::Bind(&VoidDBBusMethodCallbackThunk, callback)); | |
49 } | |
50 | |
51 void FakeLeadershipDaemonManagerClient::SetScore( | |
52 const std::string& object_path, | |
53 int score, | |
54 const VoidDBusMethodCallback& callback) { | |
55 base::MessageLoop::current()->PostTask( | |
56 FROM_HERE, base::Bind(&VoidDBBusMethodCallbackThunk, callback)); | |
57 } | |
58 | |
59 void FakeLeadershipDaemonManagerClient::PokeLeader( | |
60 const std::string& object_path, | |
61 const VoidDBusMethodCallback& callback) { | |
62 base::MessageLoop::current()->PostTask( | |
63 FROM_HERE, base::Bind(&VoidDBBusMethodCallbackThunk, callback)); | |
64 } | |
65 | |
66 void FakeLeadershipDaemonManagerClient::Ping( | |
67 const StringDBusMethodCallback& callback) { | |
68 base::MessageLoop::current()->PostTask( | |
69 FROM_HERE, base::Bind(&StringDBBusMethodCallbackThunk, callback)); | |
70 } | |
71 | |
72 const LeadershipDaemonManagerClient::GroupProperties* | |
73 FakeLeadershipDaemonManagerClient::GetGroupProperties( | |
74 const dbus::ObjectPath& object_path) { | |
75 return nullptr; | |
76 } | |
77 | |
78 } // namespace chromeos | |
OLD | NEW |