OLD | NEW |
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 CHROME_COMMON_ZIP_INTERNAL_H_ | 5 #ifndef CHROME_COMMON_ZIP_INTERNAL_H_ |
6 #define CHROME_COMMON_ZIP_INTERNAL_H_ | 6 #define CHROME_COMMON_ZIP_INTERNAL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
| 10 #if defined(USE_SYSTEM_MINIZIP) |
| 11 #include <minizip/unzip.h> |
| 12 #include <minizip/zip.h> |
| 13 #else |
10 #include "third_party/zlib/contrib/minizip/unzip.h" | 14 #include "third_party/zlib/contrib/minizip/unzip.h" |
11 #include "third_party/zlib/contrib/minizip/zip.h" | 15 #include "third_party/zlib/contrib/minizip/zip.h" |
| 16 #endif |
12 | 17 |
13 // Utility functions and constants used internally for the zip file | 18 // Utility functions and constants used internally for the zip file |
14 // library in the directory. Don't use them outside of the library. | 19 // library in the directory. Don't use them outside of the library. |
15 namespace zip { | 20 namespace zip { |
16 namespace internal { | 21 namespace internal { |
17 | 22 |
18 // Opens the given file name in UTF-8 for unzipping, with some setup for | 23 // Opens the given file name in UTF-8 for unzipping, with some setup for |
19 // Windows. | 24 // Windows. |
20 unzFile OpenForUnzipping(const std::string& file_name_utf8); | 25 unzFile OpenForUnzipping(const std::string& file_name_utf8); |
21 | 26 |
(...skipping 11 matching lines...) Expand all Loading... |
33 // Windows. |append_flag| will be passed to zipOpen2(). | 38 // Windows. |append_flag| will be passed to zipOpen2(). |
34 zipFile OpenForZipping(const std::string& file_name_utf8, int append_flag); | 39 zipFile OpenForZipping(const std::string& file_name_utf8, int append_flag); |
35 | 40 |
36 const int kZipMaxPath = 256; | 41 const int kZipMaxPath = 256; |
37 const int kZipBufSize = 8192; | 42 const int kZipBufSize = 8192; |
38 | 43 |
39 } // namespace internal | 44 } // namespace internal |
40 } // namespace zip | 45 } // namespace zip |
41 | 46 |
42 #endif // CHROME_COMMON_ZIP_INTERNAL_H_ | 47 #endif // CHROME_COMMON_ZIP_INTERNAL_H_ |
OLD | NEW |