update_engine: factor out source_copy method
Since estimator + vabc_partition_writer use the same logic for
processing source copy ops, we can factor this common code out
Bug: 322279333
Test: th
Change-Id: I0ef7b8ad50c9b987bd13cf323e97f426d60f62b5
diff --git a/payload_consumer/vabc_partition_writer.h b/payload_consumer/vabc_partition_writer.h
index 977fbe5..bd3db79 100644
--- a/payload_consumer/vabc_partition_writer.h
+++ b/payload_consumer/vabc_partition_writer.h
@@ -34,6 +34,14 @@
namespace chromeos_update_engine {
class VABCPartitionWriter final : public PartitionWriterInterface {
public:
+ static bool ProcessSourceCopyOperation(
+ const InstallOperation& operation,
+ const size_t block_size,
+ const ExtentRanges& copy_blocks,
+ const FileDescriptorPtr& source_fd,
+ android::snapshot::ICowWriter* cow_writer,
+ bool sequence_op_supported);
+
VABCPartitionWriter(const PartitionUpdate& partition_update,
const InstallPlan::Partition& install_part,
DynamicPartitionControlInterface* dynamic_control,