summaryrefslogtreecommitdiff
path: root/common/dynamic_partition_control_interface.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/dynamic_partition_control_interface.h')
-rw-r--r--common/dynamic_partition_control_interface.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/common/dynamic_partition_control_interface.h b/common/dynamic_partition_control_interface.h
index 952e8d4d..a878f2e9 100644
--- a/common/dynamic_partition_control_interface.h
+++ b/common/dynamic_partition_control_interface.h
@@ -56,12 +56,17 @@ class DynamicPartitionControlInterface {
// Return the feature flags of Virtual A/B on this device.
virtual FeatureFlag GetVirtualAbFeatureFlag() = 0;
- // Checks if |operation| can be skipped on the given partition.
+ // Attempt to optimize |operation|.
+ // If successful, |optimized| contains an operation with extents that
+ // needs to be written.
+ // If failed, no optimization is available, and caller should perform
+ // |operation| directly.
// |partition_name| should not have the slot suffix; implementation of
// DynamicPartitionControlInterface checks partition at the target slot
// previously set with PreparePartitionsForUpdate().
- virtual bool ShouldSkipOperation(const std::string& partition_name,
- const InstallOperation& operation) = 0;
+ virtual bool OptimizeOperation(const std::string& partition_name,
+ const InstallOperation& operation,
+ InstallOperation* optimized) = 0;
// Do necessary cleanups before destroying the object.
virtual void Cleanup() = 0;