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

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

Issue 2321823002: Exclude exe files while unzipping CRXes (Closed)
Patch Set: Ignore case Created 4 years, 3 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 | « extensions/utility/utility_handler.cc ('k') | third_party/zlib/google/zip.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/zlib/google/zip.h
diff --git a/third_party/zlib/google/zip.h b/third_party/zlib/google/zip.h
index 3d20e595e1af5a2d36f8fa249c52729f4dbd98af..61080c5a4f75aa0beaff415438bff14c82e0c465 100644
--- a/third_party/zlib/google/zip.h
+++ b/third_party/zlib/google/zip.h
@@ -41,6 +41,14 @@ bool ZipFiles(const base::FilePath& src_dir,
#endif // defined(OS_POSIX)
// Unzip the contents of zip_file into dest_dir.
+// For each file in zip_file, include it only if the callback |filter_cb|
+// returns true. Otherwise omit it.
+typedef base::Callback<bool(const base::FilePath&)> FilterCallback;
+bool UnzipWithFilterCallback(const base::FilePath& zip_file,
+ const base::FilePath& dest_dir,
+ const FilterCallback& filter_cb);
+
+// Unzip the contents of zip_file into dest_dir.
bool Unzip(const base::FilePath& zip_file, const base::FilePath& dest_dir);
} // namespace zip
« no previous file with comments | « extensions/utility/utility_handler.cc ('k') | third_party/zlib/google/zip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698