UpdateManager: Do not schedule update checks if booted from removable device.
This abides by the current logic, as found in
UpdateCheckScheduler::Run(). New unit test added to verify this
behavior.
BUG=chromium:358269
TEST=Unit tests.
Change-Id: I5720b2b3c85c7de7f64eec4f7da000d3e13c778d
Reviewed-on: https://chromium-review.googlesource.com/207230
Reviewed-by: Alex Deymo <deymo@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
Commit-Queue: Gilad Arnold <garnold@chromium.org>
diff --git a/update_manager/system_provider.h b/update_manager/system_provider.h
index caaecd0..8688b9c 100644
--- a/update_manager/system_provider.h
+++ b/update_manager/system_provider.h
@@ -27,6 +27,9 @@
// Returns a variable that tells whether OOBE was completed.
virtual Variable<bool>* var_is_oobe_complete() = 0;
+ // Returns a variable that tells the boot device is removable (USB stick etc).
+ virtual Variable<bool>* var_is_boot_device_removable() = 0;
+
protected:
SystemProvider() {}