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_REAL_SYSTEM_PROVIDER_H_ |
| 6 | #define CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_REAL_SYSTEM_PROVIDER_H_ |
| 7 | |
Alex Deymo | 1f01291 | 2014-04-24 19:08:04 -0700 | [diff] [blame^] | 8 | #include <base/memory/scoped_ptr.h> |
| 9 | |
Alex Deymo | bd04b14 | 2014-03-18 15:00:05 -0700 | [diff] [blame] | 10 | #include <string> |
| 11 | |
| 12 | #include "update_engine/policy_manager/system_provider.h" |
| 13 | |
| 14 | namespace chromeos_policy_manager { |
| 15 | |
| 16 | // SystemProvider concrete implementation. |
| 17 | class RealSystemProvider : public SystemProvider { |
| 18 | public: |
| 19 | RealSystemProvider() {} |
| 20 | |
Alex Deymo | 42c30c3 | 2014-04-24 18:41:18 -0700 | [diff] [blame] | 21 | // Initializes the provider and returns whether it succeeded. |
| 22 | bool Init(); |
| 23 | |
David Zeuthen | 21716e2 | 2014-04-23 15:42:05 -0700 | [diff] [blame] | 24 | virtual Variable<bool>* var_is_normal_boot_mode() override { |
| 25 | return var_is_normal_boot_mode_.get(); |
| 26 | } |
| 27 | |
| 28 | virtual Variable<bool>* var_is_official_build() override { |
| 29 | return var_is_official_build_.get(); |
| 30 | } |
| 31 | |
Alex Deymo | bd04b14 | 2014-03-18 15:00:05 -0700 | [diff] [blame] | 32 | private: |
David Zeuthen | 21716e2 | 2014-04-23 15:42:05 -0700 | [diff] [blame] | 33 | scoped_ptr<Variable<bool>> var_is_normal_boot_mode_; |
| 34 | scoped_ptr<Variable<bool>> var_is_official_build_; |
| 35 | |
Alex Deymo | bd04b14 | 2014-03-18 15:00:05 -0700 | [diff] [blame] | 36 | DISALLOW_COPY_AND_ASSIGN(RealSystemProvider); |
| 37 | }; |
| 38 | |
| 39 | } // namespace chromeos_policy_manager |
| 40 | |
| 41 | #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_REAL_SYSTEM_PROVIDER_H_ |