Chromium Code Reviews| Index: courgette/courgette.h |
| diff --git a/courgette/courgette.h b/courgette/courgette.h |
| index 5f3dbb8367a81ba5f86f85ccd92399a3f7d7e9ac..0e289441165e7630a8f69c0163fd0dbb114225a1 100644 |
| --- a/courgette/courgette.h |
| +++ b/courgette/courgette.h |
| @@ -9,6 +9,10 @@ |
| #include "base/files/file_path.h" |
| +namespace base { |
| +class File; |
|
huangs
2016/12/06 18:23:22
Same comment as in bsdiff.h: Please
- Remove the f
waffles
2016/12/06 19:18:45
Done, thanks; this was leftover from an intermedia
|
| +} // namespace base |
| + |
| namespace courgette { |
| // Status codes for Courgette APIs. |
| @@ -83,6 +87,15 @@ Status ApplyEnsemblePatch(const base::FilePath::CharType* old_file_name, |
| const base::FilePath::CharType* patch_file_name, |
| const base::FilePath::CharType* new_file_name); |
| +// Applies the patch in |patch_file| to the bytes in |old_file| and writes the |
|
huangs
2016/12/06 18:30:32
Please move this between the SourceStream* version
waffles
2016/12/06 19:18:45
Done. Curious: What's the rationale here?
huangs
2016/12/06 19:40:07
Ah, symmetry: We have A() calling B() alling C(),
|
| +// transformed ensemble to |new_file|. |
| +// Returns C_OK unless something went wrong. |
| +// This function first validates that the patch file has a proper header, so the |
| +// function can be used to 'try' a patch. |
| +Status ApplyEnsemblePatch(base::File old_file, |
| + base::File patch_file, |
| + base::File new_file); |
| + |
| // Generates a patch that will transform the bytes in |old| into the bytes in |
| // |target|. |
| // Returns C_OK unless something when wrong (unexpected). |