Chromium Code Reviews| Index: delta_diff_generator.h |
| diff --git a/delta_diff_generator.h b/delta_diff_generator.h |
| index 53d3f87037468f1e23617a606b9a1a781727653d..853f2dd628eb1b01a04b3b3c55e73a3c09ad153a 100644 |
| --- a/delta_diff_generator.h |
| +++ b/delta_diff_generator.h |
| @@ -79,12 +79,15 @@ class DeltaDiffGenerator { |
| // The final order of the nodes is given in |final_order| |
| // Some files may need to be reread from disk, thus |fd| and |
| // |data_file_size| are be passed. |
| + // If |scratch_vertex| is not kInvalidIndex, removes it from |
| + // |final_order| before returning. |
| // Returns true on success. |
| static bool ConvertGraphToDag(Graph* graph, |
| const std::string& new_root, |
| int fd, |
| off_t* data_file_size, |
| - std::vector<Vertex::Index>* final_order); |
| + std::vector<Vertex::Index>* final_order, |
| + Vertex::Index scratch_vertex); |
| // Reads old_filename (if it exists) and a new_filename and determines |
| // the smallest way to encode this file for the diff. It stores |
| @@ -100,6 +103,13 @@ class DeltaDiffGenerator { |
| DeltaArchiveManifest_InstallOperation* out_op, |
| bool gather_extents); |
| + // Creates a dummy REPLACE_BZ node in the given vertex. This can be used |
|
petkov
2010/12/02 05:04:06
I assume there's no difference if it's REPLACE_BZ
adlr
2010/12/02 19:21:41
Correct.
|
| + // to provide scratch space. The node should be marked invalid before |
| + // writing all nodes to the output file. |
| + static void CreateScratchNode(uint64_t start_block, |
| + uint64_t num_blocks, |
| + Vertex* vertex); |
| + |
| // Modifies blocks read by 'op' so that any blocks referred to by |
| // 'remove_extents' are replaced with blocks from 'replace_extents'. |
| // 'remove_extents' and 'replace_extents' must be the same number of blocks. |