blob: dc0873ba3624e30d7e1a7e54d07b3154842da1a4 [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
Gilad Arnoldcf175a02014-07-10 16:48:47 -07005#ifndef UPDATE_ENGINE_HWID_OVERRIDE_H_
6#define UPDATE_ENGINE_HWID_OVERRIDE_H_
Chris Masonef8d037f2014-02-19 01:53:00 +00007
8#include <map>
9#include <string>
10
Alex Vakulenko75039d72014-03-25 12:36:28 -070011#include <base/files/file_path.h>
Ben Chan05735a12014-09-03 07:48:22 -070012#include <base/macros.h>
Chris Masonef8d037f2014-02-19 01:53:00 +000013
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[];
Ben Chan05735a12014-09-03 07:48:22 -070027
Chris Masonef8d037f2014-02-19 01:53:00 +000028 private:
29 DISALLOW_COPY_AND_ASSIGN(HwidOverride);
30};
31
32} // namespace chromeos_update_engine
33
Gilad Arnoldcf175a02014-07-10 16:48:47 -070034#endif // UPDATE_ENGINE_HWID_OVERRIDE_H_