update_engine: New BootControlInterface class.

The new BootControlInterface class is a platform-independent
abstraction to control the bootloader. It provides methods for setting
what partition slots are available for booting and getting the
bootloader status about the available slots.

The Chrome OS specific implementation of the bootloader was moved to
the BootControlChromeOS which now depends on the vboot_host
implementation used in Chrome OS. Follow up CL will implement the
equivalent class for Brillo.

BUG=b:23010637
TEST=unittests; cros flash from the new image and rolled back from it.

Change-Id: I0a03aeeb8c21d8c99e1866b625e6e8c96628215b
diff --git a/real_system_state.cc b/real_system_state.cc
index d374cc1..5477dd6 100644
--- a/real_system_state.cc
+++ b/real_system_state.cc
@@ -20,6 +20,7 @@
 #include <base/time/time.h>
 #include <chromeos/dbus/service_constants.h>
 
+#include "update_engine/boot_control_chromeos.h"
 #include "update_engine/constants.h"
 #include "update_engine/update_manager/state_factory.h"
 #include "update_engine/utils.h"
@@ -37,6 +38,13 @@
 bool RealSystemState::Initialize() {
   metrics_lib_.Init();
 
+  // TODO(deymo): Initialize BootControl based on the build environment.
+  BootControlChromeOS* boot_control_cros = new BootControlChromeOS();
+  boot_control_.reset(boot_control_cros);
+  if (!boot_control_cros->Init()) {
+    LOG(ERROR) << "Ignoring BootControlChromeOS failure. We won't run updates.";
+  }
+
   if (!shill_proxy_.Init()) {
     LOG(ERROR) << "Failed to initialize shill proxy.";
     return false;