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

Side by Side Diff: chrome/common/zip_internal.h

Issue 8873039: Add an API to unpack Zip files directly from and to file descriptors. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Lint fixes. Created 9 years 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
« no previous file with comments | « no previous file | chrome/common/zip_internal.cc » ('j') | chrome/common/zip_reader.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "third_party/zlib/contrib/minizip/unzip.h" 11 #include "third_party/zlib/contrib/minizip/unzip.h"
12 #include "third_party/zlib/contrib/minizip/zip.h" 12 #include "third_party/zlib/contrib/minizip/zip.h"
13 13
14 // Utility functions and constants used internally for the zip file 14 // Utility functions and constants used internally for the zip file
15 // library in the directory. Don't use them outside of the library. 15 // library in the directory. Don't use them outside of the library.
16 namespace zip { 16 namespace zip {
17 namespace internal { 17 namespace internal {
18 18
19 // Opens the given file name in UTF-8 for unzipping, with some setup for 19 // Opens the given file name in UTF-8 for unzipping, with some setup for
20 // Windows. 20 // Windows.
21 unzFile OpenForUnzipping(const std::string& file_name_utf8); 21 unzFile OpenForUnzipping(const std::string& file_name_utf8);
22 22
23 #if defined(OS_POSIX)
24 // Opens the file referred to by |zip_fd| for unzipping.
25 unzFile OpenFdForUnzipping(int zip_fd);
26 #endif
27
23 // Opens the given file name in UTF-8 for zipping, with some setup for 28 // Opens the given file name in UTF-8 for zipping, with some setup for
24 // Windows. |append_flag| will be passed to zipOpen2(). 29 // Windows. |append_flag| will be passed to zipOpen2().
25 zipFile OpenForZipping(const std::string& file_name_utf8, int append_flag); 30 zipFile OpenForZipping(const std::string& file_name_utf8, int append_flag);
26 31
27 const int kZipMaxPath = 256; 32 const int kZipMaxPath = 256;
28 const int kZipBufSize = 8192; 33 const int kZipBufSize = 8192;
29 34
30 } // namespace internal 35 } // namespace internal
31 } // namespace zip 36 } // namespace zip
32 37
33 #endif // CHROME_COMMON_ZIP_INTERNAL_H_ 38 #endif // CHROME_COMMON_ZIP_INTERNAL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/common/zip_internal.cc » ('j') | chrome/common/zip_reader.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698