update_engine: Change OperationsGenerator to use BlobFileWriter

BUG=chromium:517280
TEST=Unit test for BlobFileWriter

Change-Id: Ib49925676331acee97ff6b4cec38a81ca8b157a1
Reviewed-on: https://chromium-review.googlesource.com/291441
Tested-by: Sen Jiang <senj@chromium.org>
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Sen Jiang <senj@chromium.org>
diff --git a/payload_generator/annotated_operation.h b/payload_generator/annotated_operation.h
index bacc0ab..2a88bef 100644
--- a/payload_generator/annotated_operation.h
+++ b/payload_generator/annotated_operation.h
@@ -9,6 +9,8 @@
 #include <string>
 
 #include <chromeos/secure_blob.h>
+
+#include "update_engine/payload_generator/blob_file_writer.h"
 #include "update_engine/update_metadata.pb.h"
 
 namespace chromeos_update_engine {
@@ -24,8 +26,7 @@
   // Writes |blob| to the end of |data_fd|, and updates |data_file_size| to
   // match the new size of |data_fd|. It sets the data_offset and data_length
   // in AnnotatedOperation to match the offset and size of |blob| in |data_fd|.
-  bool SetOperationBlob(chromeos::Blob* blob, int data_fd,
-                        off_t* data_file_size);
+  bool SetOperationBlob(chromeos::Blob* blob, BlobFileWriter* blob_file);
 };
 
 // For logging purposes.