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

Unified Diff: third_party/zlib/google/zip_internal.h

Issue 222323002: Move internal zip code from zip.cc to zip_internal.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 6 years, 9 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
« no previous file with comments | « third_party/zlib/google/zip.cc ('k') | third_party/zlib/google/zip_internal.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/zlib/google/zip_internal.h
diff --git a/third_party/zlib/google/zip_internal.h b/third_party/zlib/google/zip_internal.h
index 57894bebd6459390504e49a05cda92788d9301ba..ffd4039316d0b2a692f3804dde1caff8195ba7e8 100644
--- a/third_party/zlib/google/zip_internal.h
+++ b/third_party/zlib/google/zip_internal.h
@@ -19,6 +19,10 @@
#include "third_party/zlib/contrib/minizip/zip.h"
#endif
+namespace base {
+class FilePath;
+}
+
// Utility functions and constants used internally for the zip file
// library in the directory. Don't use them outside of the library.
namespace zip {
@@ -41,7 +45,7 @@ unzFile OpenHandleForUnzipping(HANDLE zip_handle);
// Creates a custom unzFile object which reads data from the specified string.
// This custom unzFile object overrides the I/O API functions of zlib so it can
// read data from the specified string.
-unzFile PreprareMemoryForUnzipping(const std::string& data);
+unzFile PrepareMemoryForUnzipping(const std::string& data);
// Opens the given file name in UTF-8 for zipping, with some setup for
// Windows. |append_flag| will be passed to zipOpen2().
@@ -53,6 +57,14 @@ zipFile OpenForZipping(const std::string& file_name_utf8, int append_flag);
zipFile OpenFdForZipping(int zip_fd, int append_flag);
#endif
+// Returns a zip_fileinfo with the last modification date of |path| set.
+zip_fileinfo GetFileInfoForZipping(const base::FilePath& path);
+
+// Wrapper around zipOpenNewFileInZip4 which passes most common options.
+bool ZipOpenNewFileInZip(zipFile zip_file,
+ const std::string& str_path,
+ const zip_fileinfo* file_info);
+
const int kZipMaxPath = 256;
const int kZipBufSize = 8192;
« no previous file with comments | « third_party/zlib/google/zip.cc ('k') | third_party/zlib/google/zip_internal.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698