diff options
author | Kelvin Zhang <zhangkelvin@google.com> | 2021-11-02 21:56:43 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-11-02 21:56:43 +0000 |
commit | 8be98142ecdba40b2ea9be10b11a23f4e6b67b05 (patch) | |
tree | 0a310ca653ef73c547d80da63c87fcb2c0636bcb /zucchini_integration.h | |
parent | b77318bc7ecfba25e4966b56b9e9ab593925ad9d (diff) | |
parent | 7be427590935bc88198d32004449ccfcf60b60d4 (diff) | |
download | zucchini-8be98142ecdba40b2ea9be10b11a23f4e6b67b05.tar.gz |
Merge remote-tracking branch 'aosp/upstream-main' into dev am: a90c04389f am: ddc43dc959 am: d9eed84a58 am: 58b4d19a6b am: 7be4275909
Original change: https://android-review.googlesource.com/c/platform/external/zucchini/+/1877854
Change-Id: Ifdb1f7882cc237258a3395d28158d50bb4b43136
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_ |