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 | #include "update_engine/policy_manager/real_system_provider.h" |
| 6 | |
| 7 | #include <string> |
| 8 | #include <vector> |
| 9 | |
| 10 | #include <base/logging.h> |
| 11 | #include <vboot/crossystem.h> |
| 12 | |
| 13 | #include "update_engine/policy_manager/generic_variables.h" |
| 14 | #include "update_engine/utils.h" |
| 15 | |
| 16 | using std::string; |
| 17 | using std::vector; |
| 18 | |
| 19 | namespace chromeos_policy_manager { |
| 20 | |
| 21 | bool RealSystemProvider::DoInit() { |
| 22 | set_var_is_normal_boot_mode( |
| 23 | new ConstCopyVariable<bool>("is_normal_boot_mode", |
| 24 | VbGetSystemPropertyInt("devsw_boot") != 0)); |
| 25 | |
| 26 | set_var_is_official_build( |
| 27 | new ConstCopyVariable<bool>("var_is_official_build", |
| 28 | VbGetSystemPropertyInt("debug_build") == 0)); |
| 29 | |
| 30 | return true; |
| 31 | } |
| 32 | |
| 33 | } // namespace chromeos_policy_manager |