Skip merge_operations which are not SOURCE_COPY

CowOperationConvert class already assumes that all merge operations are
CowCopy, as we currently don't have any other CowOp types. For safety,
skip all CowOps which are not CowCopy, in case we want to add other
types in the future.

Test: th
Change-Id: I7455f23e0e128b713fc22798ec1f2cbd918ae4d0
diff --git a/common/cow_operation_convert.cc b/common/cow_operation_convert.cc
index 4dc73a7..2564abf 100644
--- a/common/cow_operation_convert.cc
+++ b/common/cow_operation_convert.cc
@@ -20,6 +20,7 @@
 
 #include "update_engine/payload_generator/extent_ranges.h"
 #include "update_engine/payload_generator/extent_utils.h"
+#include "update_engine/update_metadata.pb.h"
 
 namespace chromeos_update_engine {
 
@@ -40,6 +41,9 @@
   // This loop handles CowCopy blocks within SOURCE_COPY, and the next loop
   // converts the leftover blocks to CowReplace?
   for (const auto& merge_op : merge_operations) {
+    if (merge_op.type() != CowMergeOperation::COW_COPY) {
+      continue;
+    }
     merge_extents.AddExtent(merge_op.dst_extent());
     const auto& src_extent = merge_op.src_extent();
     const auto& dst_extent = merge_op.dst_extent();