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/payload_state_unittest.cc b/payload_state_unittest.cc
index aea5389..e4eca89 100644
--- a/payload_state_unittest.cc
+++ b/payload_state_unittest.cc
@@ -1492,9 +1492,6 @@
   FakePrefs fake_prefs;
   fake_system_state.set_prefs(&fake_prefs);
 
-  FakeHardware* fake_hardware = fake_system_state.fake_hardware();
-  fake_hardware->SetBootDevice("/dev/sda3");
-
   EXPECT_TRUE(payload_state.Initialize(&fake_system_state));
   SetupPayloadStateWith2Urls("Hash3141", true, &payload_state, &response);
 
@@ -1540,8 +1537,8 @@
   FakePrefs fake_prefs;
   fake_system_state.set_prefs(&fake_prefs);
 
-  FakeHardware* fake_hardware = fake_system_state.fake_hardware();
-  fake_hardware->SetBootDevice("/dev/sda3");
+  FakeBootControl* fake_boot_control = fake_system_state.fake_boot_control();
+  fake_boot_control->SetCurrentSlot(0);
 
   EXPECT_TRUE(payload_state.Initialize(&fake_system_state));
   SetupPayloadStateWith2Urls("Hash3141", true, &payload_state, &response);
@@ -1552,7 +1549,7 @@
   payload_state.ExpectRebootInNewVersion("Version:12345678");
 
   // Change the BootDevice to a different one, no metric should be sent.
-  fake_hardware->SetBootDevice("/dev/sda5");
+  fake_boot_control->SetCurrentSlot(1);
 
   EXPECT_CALL(*fake_system_state.mock_metrics_lib(), SendToUMA(
       "Installer.RebootToNewPartitionAttempt", _, _, _, _))
@@ -1562,9 +1559,9 @@
       .Times(0);
   payload_state.ReportFailedBootIfNeeded();
 
-  // A second reboot in eiher partition should not send a metric.
+  // A second reboot in either partition should not send a metric.
   payload_state.ReportFailedBootIfNeeded();
-  fake_hardware->SetBootDevice("/dev/sda3");
+  fake_boot_control->SetCurrentSlot(0);
   payload_state.ReportFailedBootIfNeeded();
 }