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

Side by Side Diff: third_party/zlib/google/zip.h

Issue 179963002: New Zip::ZipFromMemory API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressing 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef THIRD_PARTY_ZLIB_GOOGLE_ZIP_H_ 5 #ifndef THIRD_PARTY_ZLIB_GOOGLE_ZIP_H_
6 #define THIRD_PARTY_ZLIB_GOOGLE_ZIP_H_ 6 #define THIRD_PARTY_ZLIB_GOOGLE_ZIP_H_
7 7
8 #include <vector>
9
8 #include "base/callback.h" 10 #include "base/callback.h"
9 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
10 12
11 namespace zip { 13 namespace zip {
12 14
13 // Zip the contents of src_dir into dest_file. src_path must be a directory. 15 // Zip the contents of src_dir into dest_file. src_path must be a directory.
14 // An entry will *not* be created in the zip for the root folder -- children 16 // An entry will *not* be created in the zip for the root folder -- children
15 // of src_dir will be at the root level of the created zip. For each file in 17 // of src_dir will be at the root level of the created zip. For each file in
16 // src_dir, include it only if the callback |filter_cb| returns true. Otherwise 18 // src_dir, include it only if the callback |filter_cb| returns true. Otherwise
17 // omit it. 19 // omit it.
(...skipping 17 matching lines...) Expand all
35 const std::vector<base::FilePath>& src_relative_paths, 37 const std::vector<base::FilePath>& src_relative_paths,
36 int dest_fd); 38 int dest_fd);
37 #endif // defined(OS_POSIX) 39 #endif // defined(OS_POSIX)
38 40
39 // Unzip the contents of zip_file into dest_dir. 41 // Unzip the contents of zip_file into dest_dir.
40 bool Unzip(const base::FilePath& zip_file, const base::FilePath& dest_dir); 42 bool Unzip(const base::FilePath& zip_file, const base::FilePath& dest_dir);
41 43
42 } // namespace zip 44 } // namespace zip
43 45
44 #endif // THIRD_PARTY_ZLIB_GOOGLE_ZIP_H_ 46 #endif // THIRD_PARTY_ZLIB_GOOGLE_ZIP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698