blob: d2bd6f185c772fbb857a7c417c2f68c2c2d953d7 [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
13RealSystemState::RealSystemState() : connection_manager_(this) {}
14
15bool RealSystemState::IsOOBEComplete() {
16 return file_util::PathExists(FilePath(kOOBECompletedMarker));
17}
18
19void RealSystemState::SetDevicePolicy(
20 const policy::DevicePolicy* device_policy) {
21 device_policy_ = device_policy;
22}
23
24const policy::DevicePolicy* RealSystemState::GetDevicePolicy() const {
25 return device_policy_;
26}
27
28ConnectionManager* RealSystemState::GetConnectionManager() {
29 return &connection_manager_;
30}
31
32} // namespace chromeos_update_engine