[Session restore] Rename group name Enabled to Restore.
[chromium-blink-merge.git] / chromeos / dbus / fake_leadership_daemon_manager_client.h
blobf6d9f283e7752aafc99bffe7831a788d28fcd4d5
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.
5 #ifndef CHROMEOS_DBUS_FAKE_LEADERSHIP_DAEMON_MANAGER_CLIENT_H_
6 #define CHROMEOS_DBUS_FAKE_LEADERSHIP_DAEMON_MANAGER_CLIENT_H_
8 #include <map>
9 #include <string>
10 #include <vector>
12 #include "chromeos/dbus/leadership_daemon_manager_client.h"
14 namespace chromeos {
16 // A fake implementation of LeadershipDaemonManagerClient. Invokes callbacks
17 // immediately.
18 class FakeLeadershipDaemonManagerClient : public LeadershipDaemonManagerClient {
19 public:
20 FakeLeadershipDaemonManagerClient();
21 ~FakeLeadershipDaemonManagerClient() override;
23 // DBusClient overrides:
24 void Init(dbus::Bus* bus) override;
26 // LeadershipDaemonManagerClient overrides:
27 void AddObserver(Observer* observer) override;
28 void RemoveObserver(Observer* observer) override;
29 void JoinGroup(const std::string& group,
30 const base::DictionaryValue& options,
31 const ObjectPathDBusMethodCallback& callback) override;
32 void LeaveGroup(const std::string& object_path,
33 const VoidDBusMethodCallback& callback) override;
34 void SetScore(const std::string& object_path,
35 int score,
36 const VoidDBusMethodCallback& callback) override;
37 void PokeLeader(const std::string& object_path,
38 const VoidDBusMethodCallback& callback) override;
39 void Ping(const StringDBusMethodCallback& callback) override;
40 const GroupProperties* GetGroupProperties(
41 const dbus::ObjectPath& object_path) override;
43 private:
44 DISALLOW_COPY_AND_ASSIGN(FakeLeadershipDaemonManagerClient);
47 } // namespace chromeos
49 #endif // CHROMEOS_DBUS_FAKE_LEADERSHIP_DAEMON_MANAGER_CLIENT_H_