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

Side by Side Diff: components/zip/zip_internal.h

Issue 14021015: Move components/zip to third_party/zip (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update unit_tests.isolate for new test data location Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « components/zip/zip.cc ('k') | components/zip/zip_internal.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_ZIP_ZIP_INTERNAL_H_
6 #define COMPONENTS_ZIP_ZIP_INTERNAL_H_
7
8 #if defined(OS_WIN)
9 #include <windows.h>
10 #endif
11
12 #include <string>
13
14 #if defined(USE_SYSTEM_MINIZIP)
15 #include <minizip/unzip.h>
16 #include <minizip/zip.h>
17 #else
18 #include "third_party/zlib/contrib/minizip/unzip.h"
19 #include "third_party/zlib/contrib/minizip/zip.h"
20 #endif
21
22 // Utility functions and constants used internally for the zip file
23 // library in the directory. Don't use them outside of the library.
24 namespace zip {
25 namespace internal {
26
27 // Opens the given file name in UTF-8 for unzipping, with some setup for
28 // Windows.
29 unzFile OpenForUnzipping(const std::string& file_name_utf8);
30
31 #if defined(OS_POSIX)
32 // Opens the file referred to by |zip_fd| for unzipping.
33 unzFile OpenFdForUnzipping(int zip_fd);
34 #endif
35
36 #if defined(OS_WIN)
37 // Opens the file referred to by |zip_handle| for unzipping.
38 unzFile OpenHandleForUnzipping(HANDLE zip_handle);
39 #endif
40
41 // Creates a custom unzFile object which reads data from the specified string.
42 // This custom unzFile object overrides the I/O API functions of zlib so it can
43 // read data from the specified string.
44 unzFile PreprareMemoryForUnzipping(const std::string& data);
45
46 // Opens the given file name in UTF-8 for zipping, with some setup for
47 // Windows. |append_flag| will be passed to zipOpen2().
48 zipFile OpenForZipping(const std::string& file_name_utf8, int append_flag);
49
50 #if defined(OS_POSIX)
51 // Opens the file referred to by |zip_fd| for zipping. |append_flag| will be
52 // passed to zipOpen2().
53 zipFile OpenFdForZipping(int zip_fd, int append_flag);
54 #endif
55
56 const int kZipMaxPath = 256;
57 const int kZipBufSize = 8192;
58
59 } // namespace internal
60 } // namespace zip
61
62 #endif // COMPONENTS_ZIP_ZIP_INTERNAL_H_
OLDNEW
« no previous file with comments | « components/zip/zip.cc ('k') | components/zip/zip_internal.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698