123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- #ifndef UPDATE_ENGINE_HARDWARE_CHROMEOS_H_
- #define UPDATE_ENGINE_HARDWARE_CHROMEOS_H_
- #include <memory>
- #include <string>
- #include <vector>
- #include <base/macros.h>
- #include <base/time/time.h>
- #include <debugd/dbus-proxies.h>
- #include "update_engine/common/hardware_interface.h"
- namespace chromeos_update_engine {
- class HardwareChromeOS final : public HardwareInterface {
- public:
- HardwareChromeOS() = default;
- ~HardwareChromeOS() override = default;
- void Init();
-
- bool IsOfficialBuild() const override;
- bool IsNormalBootMode() const override;
- bool AreDevFeaturesEnabled() const override;
- bool IsOOBEEnabled() const override;
- bool IsOOBEComplete(base::Time* out_time_of_oobe) const override;
- std::string GetHardwareClass() const override;
- std::string GetFirmwareVersion() const override;
- std::string GetECVersion() const override;
- int GetMinKernelKeyVersion() const override;
- int GetMinFirmwareKeyVersion() const override;
- int GetMaxFirmwareKeyRollforward() const override;
- bool SetMaxFirmwareKeyRollforward(int firmware_max_rollforward) override;
- bool SetMaxKernelKeyRollforward(int kernel_max_rollforward) override;
- int GetPowerwashCount() const override;
- bool SchedulePowerwash(bool is_rollback) override;
- bool CancelPowerwash() override;
- bool GetNonVolatileDirectory(base::FilePath* path) const override;
- bool GetPowerwashSafeDirectory(base::FilePath* path) const override;
- int64_t GetBuildTimestamp() const override;
- bool GetFirstActiveOmahaPingSent() const override;
- bool SetFirstActiveOmahaPingSent() override;
- private:
- friend class HardwareChromeOSTest;
-
-
-
- void LoadConfig(const std::string& root_prefix, bool normal_mode);
- bool is_oobe_enabled_;
- std::unique_ptr<org::chromium::debugdProxyInterface> debugd_proxy_;
- DISALLOW_COPY_AND_ASSIGN(HardwareChromeOS);
- };
- }
- #endif
|