libsnapshot: Add CowWriterBase, clean up CowWriter.
To support multiple implementations of CowWriter, we will need to move direct usage of CowWriter to ICowWriter. This CL does this while also adding some small cleanups: - Move ICowWriter implementation methods to a new CowWriterBase class. This keeps ICowWriter as a clean interface. - Make the "Add" methods pure virtual, move the "Emit" methods to CowWriterBase as an implementation detail. - Simplify Initialize/InitializeAppend so they can be shared. - Rename CowWriter to CowWriterV2. - Rename cow_writer.cpp to writer_v2.cpp. - Rename cow_api_test.cpp to test_v2.cpp. - Remove ICowWriter::options, replace with GetBlockSize. - Add a CreateCowWriter helper to avoid implementation details in update_engine. Bug: 280529365 Test: builds Change-Id: If50faf03b292c6c8b23a6170e3f37329fb759ff6
Loading
Please register or sign in to comment