Chris Masone | f8d037f | 2014-02-19 01:53:00 +0000 | [diff] [blame] | 1 | // Copyright (c) 2013 The Chromium OS 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. |
| 4 | |
Alex Deymo | 759c275 | 2014-03-17 21:09:36 -0700 | [diff] [blame] | 5 | #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_HWID_OVERRIDE_H_ |
| 6 | #define CHROMEOS_PLATFORM_UPDATE_ENGINE_HWID_OVERRIDE_H_ |
Chris Masone | f8d037f | 2014-02-19 01:53:00 +0000 | [diff] [blame] | 7 | |
| 8 | #include <map> |
| 9 | #include <string> |
| 10 | |
| 11 | #include <base/basictypes.h> |
Alex Vakulenko | 75039d7 | 2014-03-25 12:36:28 -0700 | [diff] [blame] | 12 | #include <base/files/file_path.h> |
Chris Masone | f8d037f | 2014-02-19 01:53:00 +0000 | [diff] [blame] | 13 | |
| 14 | namespace chromeos_update_engine { |
| 15 | |
| 16 | // Class that allows HWID to be read from <root>/etc/lsb-release. |
| 17 | class HwidOverride { |
| 18 | public: |
| 19 | HwidOverride(); |
| 20 | ~HwidOverride(); |
| 21 | |
| 22 | // Read HWID from an /etc/lsb-release file under given root. |
| 23 | // An empty string is returned if there is any error. |
| 24 | static std::string Read(const base::FilePath& root); |
| 25 | |
| 26 | static const char kHwidOverrideKey[]; |
| 27 | private: |
| 28 | DISALLOW_COPY_AND_ASSIGN(HwidOverride); |
| 29 | }; |
| 30 | |
| 31 | } // namespace chromeos_update_engine |
| 32 | |
Alex Deymo | 759c275 | 2014-03-17 21:09:36 -0700 | [diff] [blame] | 33 | #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_HWID_OVERRIDE_H_ |