• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright (C) 2013 The Android Open Source Project
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //      http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16 
17 #ifndef UPDATE_ENGINE_HARDWARE_CHROMEOS_H_
18 #define UPDATE_ENGINE_HARDWARE_CHROMEOS_H_
19 
20 #include <string>
21 #include <vector>
22 
23 #include <base/macros.h>
24 #include <base/time/time.h>
25 
26 #include "update_engine/common/hardware_interface.h"
27 
28 namespace chromeos_update_engine {
29 
30 // Implements the real interface with Chrome OS verified boot and recovery
31 // process.
32 class HardwareChromeOS final : public HardwareInterface {
33  public:
34   HardwareChromeOS() = default;
35   ~HardwareChromeOS() override = default;
36 
37   // HardwareInterface methods.
38   bool IsOfficialBuild() const override;
39   bool IsNormalBootMode() const override;
40   bool IsOOBEComplete(base::Time* out_time_of_oobe) const override;
41   std::string GetHardwareClass() const override;
42   std::string GetFirmwareVersion() const override;
43   std::string GetECVersion() const override;
44   int GetPowerwashCount() const override;
45   bool GetNonVolatileDirectory(base::FilePath* path) const override;
46   bool GetPowerwashSafeDirectory(base::FilePath* path) const override;
47 
48  private:
49   DISALLOW_COPY_AND_ASSIGN(HardwareChromeOS);
50 };
51 
52 }  // namespace chromeos_update_engine
53 
54 #endif  // UPDATE_ENGINE_HARDWARE_CHROMEOS_H_
55