| // Copyright 2018 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| module chrome_cleaner.mojom; |
| |
| // Represent result codes from the zip archiver. |
| enum ZipArchiverResultCode { |
| kSuccess = 0, |
| kErrorInvalidParameter = 1, |
| // Any error on file operations. |
| kErrorIO = 2, |
| kErrorMinizipInternal = 3, |
| kErrorCannotOpenSourceFile = 4, |
| kErrorCannotCreateZipFile = 5, |
| kZipFileExists = 6, |
| kIgnoredSourceFile = 7, |
| kErrorNotEnoughDiskSpace = 8, |
| kErrorSourceFileTooBig = 9, |
| }; |
| |
| interface ZipArchiver { |
| // Passes |src_file_handle| which is open for reading and |zip_file_handle| |
| // which is open read/write from the high-privilege sandbox broker process to |
| // a locked down sandbox target process. The implementation will add the |
| // contents of the source file to the zip file, using the name |
| // |filename_in_zip| in the zip index, and encrypting the file with |
| // |password|. |
| Archive(handle src_file_handle, handle zip_file_handle, |
| string filename_in_zip, string password) |
| => (ZipArchiverResultCode result_code); |
| }; |