Move MarkBootSuccessful to BootControlInterface.
Updating the boot flags to mark the current boot as successful is
platform-specific and part of the BootControlInterface's job. This
patch moves this to a new async method in this interface.
Bug: 24077637
Test: FEATURES=test emerge-link update_engine; cros flash in Chrome OS; tested on a dragonboard.
Change-Id: I23c3ed915dd8d2588a90d84b212bb04977957975
diff --git a/fake_boot_control.h b/fake_boot_control.h
index 508f578f..9d1b54b 100644
--- a/fake_boot_control.h
+++ b/fake_boot_control.h
@@ -65,6 +65,13 @@
return true;
}
+ bool MarkBootSuccessfulAsync(base::Callback<void(bool)> callback) override {
+ // We run the callback directly from here to avoid having to setup a message
+ // loop in the test environment.
+ callback.Run(true);
+ return true;
+ }
+
// Setters
void SetNumSlots(unsigned int num_slots) {
num_slots_ = num_slots;