Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chromeos / dbus / fake_debug_daemon_client.h
blobc1016566eaad000beaa571ef17451d2099c5df07
1 // Copyright 2013 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_DEBUG_DAEMON_CLIENT_H_
6 #define CHROMEOS_DBUS_FAKE_DEBUG_DAEMON_CLIENT_H_
8 #include <vector>
10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h"
12 #include "chromeos/dbus/debug_daemon_client.h"
14 namespace chromeos {
16 // The DebugDaemonClient implementation used on Linux desktop,
17 // which does nothing.
18 class CHROMEOS_EXPORT FakeDebugDaemonClient : public DebugDaemonClient {
19 public:
20 FakeDebugDaemonClient();
21 ~FakeDebugDaemonClient() override;
23 void Init(dbus::Bus* bus) override;
24 void DumpDebugLogs(bool is_compressed,
25 base::File file,
26 scoped_refptr<base::TaskRunner> task_runner,
27 const GetDebugLogsCallback& callback) override;
28 void SetDebugMode(const std::string& subsystem,
29 const SetDebugModeCallback& callback) override;
30 void StartSystemTracing() override;
31 bool RequestStopSystemTracing(
32 scoped_refptr<base::TaskRunner> task_runner,
33 const StopSystemTracingCallback& callback) override;
34 void GetRoutes(bool numeric,
35 bool ipv6,
36 const GetRoutesCallback& callback) override;
37 void GetNetworkStatus(const GetNetworkStatusCallback& callback) override;
38 void GetModemStatus(const GetModemStatusCallback& callback) override;
39 void GetWiMaxStatus(const GetWiMaxStatusCallback& callback) override;
40 void GetNetworkInterfaces(
41 const GetNetworkInterfacesCallback& callback) override;
42 void GetPerfOutput(uint32_t duration,
43 const GetPerfOutputCallback& callback) override;
44 void GetPerfOutput(uint32_t duration,
45 const std::vector<std::string>& perf_args,
46 const GetPerfOutputCallback& callback) override;
47 void GetScrubbedLogs(const GetLogsCallback& callback) override;
48 void GetAllLogs(const GetLogsCallback& callback) override;
49 void GetUserLogFiles(const GetLogsCallback& callback) override;
50 void TestICMP(const std::string& ip_address,
51 const TestICMPCallback& callback) override;
52 void TestICMPWithOptions(const std::string& ip_address,
53 const std::map<std::string, std::string>& options,
54 const TestICMPCallback& callback) override;
55 void UploadCrashes() override;
56 void EnableDebuggingFeatures(
57 const std::string& password,
58 const EnableDebuggingCallback& callback) override;
59 void QueryDebuggingFeatures(
60 const QueryDevFeaturesCallback& callback) override;
61 void RemoveRootfsVerification(
62 const EnableDebuggingCallback& callback) override;
63 void WaitForServiceToBeAvailable(
64 const WaitForServiceToBeAvailableCallback& callback) override;
66 // Sets debugging features mask for testing.
67 virtual void SetDebuggingFeaturesStatus(int featues_mask);
69 // Changes the behavior of WaitForServiceToBeAvailable(). This method runs
70 // pending callbacks if is_available is true.
71 void SetServiceIsAvailable(bool is_available);
73 private:
74 int featues_mask_;
76 bool service_is_available_;
77 std::vector<WaitForServiceToBeAvailableCallback>
78 pending_wait_for_service_to_be_available_callbacks_;
80 DISALLOW_COPY_AND_ASSIGN(FakeDebugDaemonClient);
83 } // namespace chromeos
85 #endif // CHROMEOS_DBUS_FAKE_DEBUG_DAEMON_CLIENT_H_