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: Fix build 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
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;
Devlin 2016/09/08 21:10:16 prefer using syntax
meacer 2016/09/08 22:40:11 Actually, this is typedeffed above so removed the
+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

Powered by Google App Engine
This is Rietveld 408576698