Alex Deymo | bd04b14 | 2014-03-18 15:00:05 -0700 | [diff] [blame] | 1 | // Copyright (c) 2014 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_POLICY_MANAGER_SYSTEM_PROVIDER_H_ |
| 6 | #define CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_SYSTEM_PROVIDER_H_ |
| 7 | |
Alex Deymo | bd04b14 | 2014-03-18 15:00:05 -0700 | [diff] [blame] | 8 | #include "update_engine/policy_manager/provider.h" |
| 9 | #include "update_engine/policy_manager/variable.h" |
| 10 | |
| 11 | namespace chromeos_policy_manager { |
| 12 | |
| 13 | // Provider for system information, mostly constant, such as the information |
| 14 | // reported by crossystem, the kernel boot command line and the partition table. |
| 15 | class SystemProvider : public Provider { |
| 16 | public: |
David Zeuthen | 21716e2 | 2014-04-23 15:42:05 -0700 | [diff] [blame] | 17 | virtual ~SystemProvider() {} |
| 18 | |
Alex Deymo | bd04b14 | 2014-03-18 15:00:05 -0700 | [diff] [blame] | 19 | // Returns true if the boot mode is normal or if it's unable to |
| 20 | // determine the boot mode. Returns false if the boot mode is |
| 21 | // developer. |
David Zeuthen | 21716e2 | 2014-04-23 15:42:05 -0700 | [diff] [blame] | 22 | virtual Variable<bool>* var_is_normal_boot_mode() = 0; |
Alex Deymo | bd04b14 | 2014-03-18 15:00:05 -0700 | [diff] [blame] | 23 | |
| 24 | // Returns whether this is an official Chrome OS build. |
David Zeuthen | 21716e2 | 2014-04-23 15:42:05 -0700 | [diff] [blame] | 25 | virtual Variable<bool>* var_is_official_build() = 0; |
Alex Deymo | bd04b14 | 2014-03-18 15:00:05 -0700 | [diff] [blame] | 26 | |
| 27 | protected: |
| 28 | SystemProvider() {} |
| 29 | |
Alex Deymo | bd04b14 | 2014-03-18 15:00:05 -0700 | [diff] [blame] | 30 | private: |
Alex Deymo | bd04b14 | 2014-03-18 15:00:05 -0700 | [diff] [blame] | 31 | DISALLOW_COPY_AND_ASSIGN(SystemProvider); |
| 32 | }; |
| 33 | |
| 34 | } // namespace chromeos_policy_manager |
| 35 | |
| 36 | #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_SYSTEM_PROVIDER_H_ |