diff options
author | Samuel Huang <huangs@chromium.org> | 2018-06-21 15:50:22 +0000 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2021-07-25 19:59:48 -0700 |
commit | f35146e48edca6755e98749a2cb5cc00272d308b (patch) | |
tree | 62e88698cbb4f79fea0f7b10326961b0f665e0a8 /mapped_file.h | |
parent | 87dabe1110568bd11cd9044b1c5c49ab598bc2ad (diff) | |
download | zucchini-f35146e48edca6755e98749a2cb5cc00272d308b.tar.gz |
[Zucchini] Refactor Zucchini-gen in zucchini_io layer.
This CL moves Zucchini-gen invocation code from zucchini_commands.cc
(in target zucchini) to zucchini_integration.cc (in target zucchini_io)
to clean up layering in Zucchini API, i.e.:
- zucchini_lib: Operates on buffers only.
- zucchini_io: Adds files interface, uses memory-mapped I/O.
- zucchini: Stand-alone executable that parses command-line arguments.
Other changes:
- Rename zucchini_lib functions (zuchcini.h), to dedup names and
emphasize that these functions operate on buffers:
- GenerateEnsemble() -> GenerateBuffer(),
- GenerateEnsembleWithImposedMatches() -> GenerateBufferImposed(),
- GenerateRaw() -> GenerateBufferRaw(),
- Apply() -> ApplyBuffer().
These renames only affect Zucchini and various tests.
- Variable renames and parameter reordering in zucchini_integration.cc.
- Remove '-dd' param in help text of Zucchini-detect (was never ported
from Trunk, and has been recently deleted there as well).
- Replace all base::File&& with base::File.
- Miscellaneous cleanup for header include.
- Update README.md.
Change-Id: I835b80d4d3d7b291fa822a7a89dab225bf9171e9
Reviewed-on: https://chromium-review.googlesource.com/1105625
Reviewed-by: Samuel Huang <huangs@chromium.org>
Reviewed-by: Greg Thompson <grt@chromium.org>
Commit-Queue: Samuel Huang <huangs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569274}
NOKEYCHECK=True
GitOrigin-RevId: 9f0f325d6e2595deb8d50c77e0464946f3bf1ec1
Diffstat (limited to 'mapped_file.h')
-rw-r--r-- | mapped_file.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mapped_file.h b/mapped_file.h index 540f947..e8cd590 100644 --- a/mapped_file.h +++ b/mapped_file.h @@ -23,7 +23,7 @@ class MappedFileReader { public: // Maps |file| to memory for reading. Also validates |file|. Errors are // available via HasError() and error(). - explicit MappedFileReader(base::File&& file); + explicit MappedFileReader(base::File file); const uint8_t* data() const { return buffer_.data(); } size_t length() const { return buffer_.length(); } @@ -47,7 +47,7 @@ class MappedFileWriter { // UNIX systems, but can be empty if auto delete is not needed. Errors are // available via HasError() and error(). MappedFileWriter(const base::FilePath& file_path, - base::File&& file, + base::File file, size_t length); ~MappedFileWriter(); |