blob: 57483ea9aea58cbeec3beac7ceed48bc98350516 [file] [log] [blame]
Jay Srinivasan43488792012-06-19 00:25:31 -07001// Copyright (c) 2012 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 <base/file_util.h>
6
7#include "update_engine/system_state.h"
8
9namespace chromeos_update_engine {
10
11static const char kOOBECompletedMarker[] = "/home/chronos/.oobe_completed";
12
Jay Srinivasan34b5d862012-07-23 11:43:22 -070013RealSystemState::RealSystemState()
14 : device_policy_(NULL),
15 connection_manager_(this) {}
Jay Srinivasan43488792012-06-19 00:25:31 -070016
17bool RealSystemState::IsOOBEComplete() {
18 return file_util::PathExists(FilePath(kOOBECompletedMarker));
19}
20
21void RealSystemState::SetDevicePolicy(
22 const policy::DevicePolicy* device_policy) {
23 device_policy_ = device_policy;
24}
25
26const policy::DevicePolicy* RealSystemState::GetDevicePolicy() const {
27 return device_policy_;
28}
29
30ConnectionManager* RealSystemState::GetConnectionManager() {
31 return &connection_manager_;
32}
33
34} // namespace chromeos_update_engine