blob: 4d9bf9bd95cdd5a41010cb1729f91a7f1497742c [file] [log] [blame]
Chris Masonef8d037f2014-02-19 01:53:00 +00001// 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 Deymo759c2752014-03-17 21:09:36 -07005#ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_HWID_OVERRIDE_H_
6#define CHROMEOS_PLATFORM_UPDATE_ENGINE_HWID_OVERRIDE_H_
Chris Masonef8d037f2014-02-19 01:53:00 +00007
8#include <map>
9#include <string>
10
11#include <base/basictypes.h>
12#include <base/file_path.h>
13
14namespace chromeos_update_engine {
15
16// Class that allows HWID to be read from <root>/etc/lsb-release.
17class 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 Deymo759c2752014-03-17 21:09:36 -070033#endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_HWID_OVERRIDE_H_