Jay Srinivasan | 4348879 | 2012-06-19 00:25:31 -0700 | [diff] [blame] | 1 | // 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 | |
| 9 | namespace chromeos_update_engine { |
| 10 | |
| 11 | static const char kOOBECompletedMarker[] = "/home/chronos/.oobe_completed"; |
| 12 | |
| 13 | RealSystemState::RealSystemState() : connection_manager_(this) {} |
| 14 | |
| 15 | bool RealSystemState::IsOOBEComplete() { |
| 16 | return file_util::PathExists(FilePath(kOOBECompletedMarker)); |
| 17 | } |
| 18 | |
| 19 | void RealSystemState::SetDevicePolicy( |
| 20 | const policy::DevicePolicy* device_policy) { |
| 21 | device_policy_ = device_policy; |
| 22 | } |
| 23 | |
| 24 | const policy::DevicePolicy* RealSystemState::GetDevicePolicy() const { |
| 25 | return device_policy_; |
| 26 | } |
| 27 | |
| 28 | ConnectionManager* RealSystemState::GetConnectionManager() { |
| 29 | return &connection_manager_; |
| 30 | } |
| 31 | |
| 32 | } // namespace chromeos_update_engine |