Make Hardware class platform specific.
The Hardware class abstracts the interaction with the actual hardware
which is inherently platform-specific. This patch implementes a stub
version for Android and moves the Chromium OS implementation, handling
both with the same public factory method.
Bug: 23084776
TEST=emerge-link update_engine; `mma -i` builds the stubs.
Change-Id: I19c791a2e3fa22f0ac38bbe68a9c47838bcf019a
diff --git a/update_manager/real_system_provider.cc b/update_manager/real_system_provider.cc
index d0d788d..90173a0 100644
--- a/update_manager/real_system_provider.cc
+++ b/update_manager/real_system_provider.cc
@@ -27,7 +27,6 @@
#include <base/logging.h>
#include <base/strings/stringprintf.h>
#include <base/time/time.h>
-#include <vboot/crossystem.h>
#include "update_engine/update_manager/generic_variables.h"
#include "update_engine/utils.h"
@@ -39,11 +38,11 @@
bool RealSystemProvider::Init() {
var_is_normal_boot_mode_.reset(
new ConstCopyVariable<bool>("is_normal_boot_mode",
- VbGetSystemPropertyInt("devsw_boot") != 0));
+ hardware_->IsNormalBootMode()));
var_is_official_build_.reset(
new ConstCopyVariable<bool>("is_official_build",
- VbGetSystemPropertyInt("debug_build") == 0));
+ hardware_->IsOfficialBuild()));
var_is_oobe_complete_.reset(
new CallCopyVariable<bool>(