BootControl exposes DynamicPartitionControl.

Add BootControlInterface::GetDynamicPartitionControl, which
exposes the internal DynamicPartitionControlInterface object.

BootControlStub / FakeBootControl / BootControlChromeOS uses
DynamicPartitionControlStub (all functions succeeds).

BootControlAndroid uses DynamicPartitionControlAndroid.
GetPartitionDevice is exposed so that BootControlAndroid can use it.

Follow-up CLs delete duplicated PreparePartitionsForUpdate
and Cleanup from BootControlInterface so that BootControlAndroid remains
a thin wrapper of the HAL (+GetPartitionDevice, which exists before
dynamic partitions.)

Test: update_engine_unittests

Change-Id: Ifc2aa2ee8a63ef581c8ebc562ec158794ac51dfd
diff --git a/boot_control_chromeos.cc b/boot_control_chromeos.cc
index 7e748d5..3792e6d 100644
--- a/boot_control_chromeos.cc
+++ b/boot_control_chromeos.cc
@@ -31,6 +31,7 @@
 }
 
 #include "update_engine/common/boot_control.h"
+#include "update_engine/common/dynamic_partition_control_stub.h"
 #include "update_engine/common/subprocess.h"
 #include "update_engine/common/utils.h"
 
@@ -131,6 +132,8 @@
     return false;
   }
 
+  dynamic_partition_control_.reset(new DynamicPartitionControlStub());
+
   LOG(INFO) << "Booted from slot " << current_slot_ << " (slot "
             << SlotName(current_slot_) << ") of " << num_slots_
             << " slots present on disk " << boot_disk_name_;
@@ -333,4 +336,9 @@
 
 void BootControlChromeOS::Cleanup() {}
 
+DynamicPartitionControlInterface*
+BootControlChromeOS::GetDynamicPartitionControl() {
+  return dynamic_partition_control_.get();
+}
+
 }  // namespace chromeos_update_engine