1// Copyright (c) 2011 The Chromium 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 CHROME_BROWSER_CHROMEOS_SYSTEM_STATISTICS_PROVIDER_H_
6#define CHROME_BROWSER_CHROMEOS_SYSTEM_STATISTICS_PROVIDER_H_
7
8#include <string>
9
10namespace chromeos {
11namespace system {
12
13// Developer switch value.
14extern const char kDevSwitchBootMode[];
15
16// HWID key.
17extern const char kHardwareClass[];
18
19// Machine board key.
20extern const char kMachineInfoBoard[];
21
22// OEM customization flag that permits exiting enterprise enrollment flow in
23// OOBE when 'oem_enterprise_managed' flag is set.
24extern const char kOemCanExitEnterpriseEnrollmentKey[];
25
26// OEM customization directive that specified intended device purpose.
27extern const char kOemDeviceRequisitionKey[];
28
29// OEM customization flag that enforces enterprise enrollment flow in OOBE.
30extern const char kOemIsEnterpriseManagedKey[];
31
32// OEM customization flag that specifies if OOBE flow should be enhanced for
33// keyboard driven control.
34extern const char kOemKeyboardDrivenOobeKey[];
35
36// Offer coupon code key.
37extern const char kOffersCouponCodeKey[];
38
39// Offer group key.
40extern const char kOffersGroupCodeKey[];
41
42// This interface provides access to Chrome OS statistics.
43class StatisticsProvider {
44 public:
45  // Initializes the statistics provider.
46  virtual void Init() = 0;
47
48  // Starts loading the machine statistcs.
49  virtual void StartLoadingMachineStatistics() = 0;
50
51  // Retrieve the named machine statistic (e.g. "hardware_class").
52  // This does not update the statistcs. If the |name| is not set, |result|
53  // preserves old value.
54  virtual bool GetMachineStatistic(const std::string& name,
55                                   std::string* result) = 0;
56
57  // Retrieve boolean value for named machine flag.
58  virtual bool GetMachineFlag(const std::string& name,
59                              bool* result) = 0;
60
61  // Loads kiosk oem manifest file.
62  virtual void LoadOemManifest() = 0;
63
64  static StatisticsProvider* GetInstance();
65
66 protected:
67  virtual ~StatisticsProvider() {}
68};
69
70}  // namespace system
71}  // namespace chromeos
72
73#endif  // CHROME_BROWSER_CHROMEOS_SYSTEM_STATISTICS_PROVIDER_H_
74