Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1239)

Unified Diff: ui/file_manager/zip_archiver/cpp/volume_archive.h

Issue 2807063002: Replace Libarchive with MiniZip. (Closed)
Patch Set: Fix a few nits. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/file_manager/zip_archiver/cpp/volume_archive.h
diff --git a/ui/file_manager/zip_archiver/cpp/volume_archive.h b/ui/file_manager/zip_archiver/cpp/volume_archive.h
index cd7aac90bbf916db0c93dfe6efb07000c47a1c7a..52067fec3c9f445347e85020299127a2472c1038 100644
--- a/ui/file_manager/zip_archiver/cpp/volume_archive.h
+++ b/ui/file_manager/zip_archiver/cpp/volume_archive.h
@@ -31,16 +31,20 @@ class VolumeArchive {
// archive file.
virtual bool Init(const std::string& encoding) = 0;
- // Gets the next header. In case of failure the error message can be
- // obtained with VolumeArchive::error_message().
- virtual Result GetNextHeader() = 0;
- virtual Result GetNextHeader(const char** path_name,
- int64_t* size,
- bool* is_directory,
- time_t* modification_time) = 0;
+ // Gets the next header. If path_name is set to nullptr, then there are no more
+ // available headers. Returns true if reading next header was successful.
+ // In case of failure the error message can be obtained with
+ // VolumeArchive::error_message().
+ virtual VolumeArchive::Result GetCurrentFileInfo(
+ std::string* path_name,
+ int64_t* size,
+ bool* is_directory,
+ time_t* modification_time) = 0;
+
+ virtual VolumeArchive::Result GoToNextFile() = 0;
- // Seeks to the |index|-th header.
- virtual bool SeekHeader(int64_t index) = 0;
+ // Seeks to the header whose pathname is path_name.
+ virtual bool SeekHeader(const std::string& path_name) = 0;
// Gets data from offset to offset + length for the file reached with
// VolumeArchive::GetNextHeader. The data is stored in an internal buffer
@@ -86,7 +90,7 @@ class VolumeArchive {
// cannot be reinitialized.
void CleanupReader() {
delete reader_;
- reader_ = NULL;
+ reader_ = nullptr;
}
void set_error_message(const std::string& error_message) {
« no previous file with comments | « ui/file_manager/zip_archiver/cpp/volume.cc ('k') | ui/file_manager/zip_archiver/cpp/volume_archive_libarchive.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698