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

Unified Diff: chrome/common/zip.h

Issue 11309014: File manager: support for zipping selected files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Define zip::ZipFileList method to internalize details with handling file lists. Created 8 years, 1 month 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: chrome/common/zip.h
diff --git a/chrome/common/zip.h b/chrome/common/zip.h
index 7b95795a2f20436ed88765e3579663978397122a..882db5e97961503170f1abb83975399c09b25143 100644
--- a/chrome/common/zip.h
+++ b/chrome/common/zip.h
@@ -6,8 +6,7 @@
#define CHROME_COMMON_ZIP_H_
#include "base/callback.h"
-
-class FilePath;
+#include "base/file_path.h"
namespace zip {
@@ -26,6 +25,13 @@ bool ZipWithFilterCallback(const FilePath& src_dir, const FilePath& dest_file,
bool Zip(const FilePath& src_dir, const FilePath& dest_file,
bool include_hidden_files);
+// Zip the source files listed under src_file_list into dest_file. The src_dir
+// must be a directory. Source files in src_file_list must be children of
+// src_dir to be included in the created zip. Children of src_dir will be at the
+// root level of the created zip.
+bool ZipFileList(const FilePath& src_dir, const FilePath& dest_file,
+ const std::vector<FilePath>& src_file_list);
+
// Unzip the contents of zip_file into dest_dir.
bool Unzip(const FilePath& zip_file, const FilePath& dest_dir);

Powered by Google App Engine
This is Rietveld 408576698