| // Copyright 2019 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. |
| |
| #ifndef CHROMEOS_DBUS_CROS_HEALTHD_FAKE_CROS_HEALTHD_SERVICE_H_ |
| #define CHROMEOS_DBUS_CROS_HEALTHD_FAKE_CROS_HEALTHD_SERVICE_H_ |
| |
| #include "base/macros.h" |
| #include "chromeos/services/cros_healthd/public/mojom/cros_healthd.mojom.h" |
| #include "chromeos/services/cros_healthd/public/mojom/cros_healthd_probe.mojom.h" |
| |
| namespace chromeos { |
| namespace cros_healthd { |
| |
| class FakeCrosHealthdService final : public mojom::CrosHealthdService { |
| public: |
| FakeCrosHealthdService(); |
| ~FakeCrosHealthdService() override; |
| |
| // CrosHealthdService overrides: |
| void ProbeTelemetryInfo( |
| const std::vector<mojom::ProbeCategoryEnum>& categories, |
| ProbeTelemetryInfoCallback callback) override; |
| |
| // Set the TelemetryInfoPtr that will be used in the response to any |
| // ProbeTelemetryInfo IPCs received. |
| void SetProbeTelemetryInfoResponseForTesting( |
| mojom::TelemetryInfoPtr& response_info); |
| |
| private: |
| // Used as the response to any ProbeTelemetryInfo IPCs received. |
| mojom::TelemetryInfoPtr response_info_{mojom::TelemetryInfo::New()}; |
| |
| DISALLOW_COPY_AND_ASSIGN(FakeCrosHealthdService); |
| }; |
| |
| } // namespace cros_healthd |
| } // namespace chromeos |
| |
| #endif // CHROMEOS_DBUS_CROS_HEALTHD_FAKE_CROS_HEALTHD_SERVICE_H_ |