blob: 6b19268ffc81239ed919a171634e026ad646771d [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
Alex Deymo42c30c32014-04-24 18:41:18 -070021bool RealSystemProvider::Init() {
David Zeuthen21716e22014-04-23 15:42:05 -070022 var_is_normal_boot_mode_.reset(
Alex Deymobd04b142014-03-18 15:00:05 -070023 new ConstCopyVariable<bool>("is_normal_boot_mode",
24 VbGetSystemPropertyInt("devsw_boot") != 0));
25
David Zeuthen21716e22014-04-23 15:42:05 -070026 var_is_official_build_.reset(
Alex Deymobd04b142014-03-18 15:00:05 -070027 new ConstCopyVariable<bool>("var_is_official_build",
28 VbGetSystemPropertyInt("debug_build") == 0));
29
30 return true;
31}
32
33} // namespace chromeos_policy_manager