blob: 8f8dbc602fc0e433772242126dbe6632418be5aa [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
5#ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_HWID_OVERRIDE_H__
6#define CHROMEOS_PLATFORM_UPDATE_ENGINE_HWID_OVERRIDE_H__
7
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
33#endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_HWID_OVERRIDE_H__