blob: 72669ffc929dbada9895199b402d7a576deb9a5b [file] [log] [blame]
Alex Deymobd04b142014-03-18 15:00:05 -07001// 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
16using std::string;
17using std::vector;
18
19namespace chromeos_policy_manager {
20
21bool 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