diff options
author | Kelvin Zhang <zhangkelvin@google.com> | 2021-11-01 19:27:26 -0700 |
---|---|---|
committer | Kelvin Zhang <zhangkelvin@google.com> | 2021-11-02 02:38:22 +0000 |
commit | a90c04389f86ed4363674e20b0d5f171dea7ebeb (patch) | |
tree | 0a310ca653ef73c547d80da63c87fcb2c0636bcb /zucchini_integration.h | |
parent | f2da819cb37cb2376c917506fb1eb154ec61586a (diff) | |
parent | 8bb965d29e918d0559589a215ff7f4bd0874bc08 (diff) | |
download | zucchini-a90c04389f86ed4363674e20b0d5f171dea7ebeb.tar.gz |
Merge remote-tracking branch 'aosp/upstream-main' into dev
This performs a merge on upstream zucchini.
Change-Id: I8a4844407558d6f1e439939ee634fe17ed7a4e55
Diffstat (limited to 'zucchini_integration.h')
-rw-r--r-- | zucchini_integration.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/zucchini_integration.h b/zucchini_integration.h index 2ae6091..2b6287b 100644 --- a/zucchini_integration.h +++ b/zucchini_integration.h @@ -63,6 +63,16 @@ status::Code Apply(const base::FilePath& old_path, const base::FilePath& new_path, bool force_keep = false); +// Verifies the patch format in |patch_file| and returns +// Code::kStatusPatchReadError if the patch is malformed or version is +// unsupported. Since this uses memory mapped files, crashes are expected in +// case of I/O errors. +status::Code VerifyPatch(base::File patch_file); + +// Alternative VerifyPatch() interface that takes base::FilePath as arguments. +// Performs proper cleanup in Windows and UNIX if failure occurs. +status::Code VerifyPatch(const base::FilePath& patch_path); + } // namespace zucchini #endif // COMPONENTS_ZUCCHINI_ZUCCHINI_INTEGRATION_H_ |