Move IsBootDeviceRemovable() to the HardwareInterface.
The UpdateCheckScheduler class had a IsBootDeviceRemovable method to
mock out the value during testing of that class. Instead, this patch
uses the HardwareInterface to mock out that value.
BUG=chromium:358269
TEST=Unittests updated.
Change-Id: Ib20f70fa0468aaa4bc8bb1b674084bd9a61e5085
Reviewed-on: https://chromium-review.googlesource.com/197598
Tested-by: Alex Deymo <deymo@chromium.org>
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
diff --git a/hardware.cc b/hardware.cc
index 5d5492f..441e066 100644
--- a/hardware.cc
+++ b/hardware.cc
@@ -60,6 +60,10 @@
return boot_path;
}
+bool Hardware::IsBootDeviceRemovable() const {
+ return utils::IsRemovableDevice(utils::GetDiskName(BootDevice()));
+}
+
bool Hardware::IsKernelBootable(const std::string& kernel_device,
bool* bootable) const {
CgptAddParams params;