UpdateEngine-side changes to allow updates over 3G based on device policy.

Some enterprise chromebooks have only 3G and hence they need the ability
to update over 3G if the enterprise policy allows that. This CL adds
the support in update_engine to enable that.

BUG=chromium-os:31099
TEST=Tested E2E on 3G, added unit tests and did regression testing.
CQ-DEPEND=I1a55a392f3dc0f12d917eb45dcf0456b57735514
Change-Id: I121bda35e54fa6c35e002a76db198d13b72b650e
Reviewed-on: https://gerrit.chromium.org/gerrit/25470
Commit-Ready: Jay Srinivasan <jaysri@chromium.org>
Reviewed-by: Jay Srinivasan <jaysri@chromium.org>
Tested-by: Jay Srinivasan <jaysri@chromium.org>
diff --git a/system_state.cc b/system_state.cc
new file mode 100644
index 0000000..d2bd6f1
--- /dev/null
+++ b/system_state.cc
@@ -0,0 +1,32 @@
+// Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include <base/file_util.h>
+
+#include "update_engine/system_state.h"
+
+namespace chromeos_update_engine {
+
+static const char kOOBECompletedMarker[] = "/home/chronos/.oobe_completed";
+
+RealSystemState::RealSystemState() : connection_manager_(this) {}
+
+bool RealSystemState::IsOOBEComplete() {
+  return file_util::PathExists(FilePath(kOOBECompletedMarker));
+}
+
+void RealSystemState::SetDevicePolicy(
+    const policy::DevicePolicy* device_policy) {
+  device_policy_ = device_policy;
+}
+
+const policy::DevicePolicy* RealSystemState::GetDevicePolicy() const {
+  return device_policy_;
+}
+
+ConnectionManager* RealSystemState::GetConnectionManager() {
+  return &connection_manager_;
+}
+
+}  // namespace chromeos_update_engine