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

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

Issue 11214002: Linux: add an option to use system minizip. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: style nit Created 8 years, 2 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 | « chrome/common/zip_internal.h ('k') | chrome/common/zip_reader.cc » ('j') | no next file with comments »
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 #include "chrome/common/zip.h" 5 #include "chrome/common/zip.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
11
12 #if defined(USE_SYSTEM_MINIZIP)
13 #include <minizip/unzip.h>
14 #include <minizip/zip.h>
15 #include <minizip/ioapi.h>
16 #else
11 #include "third_party/zlib/contrib/minizip/unzip.h" 17 #include "third_party/zlib/contrib/minizip/unzip.h"
12 #include "third_party/zlib/contrib/minizip/zip.h" 18 #include "third_party/zlib/contrib/minizip/zip.h"
13 #if defined(OS_WIN) 19 #if defined(OS_WIN)
14 #include "third_party/zlib/contrib/minizip/iowin32.h" 20 #include "third_party/zlib/contrib/minizip/iowin32.h"
15 #elif defined(OS_POSIX) 21 #elif defined(OS_POSIX)
16 #include "third_party/zlib/contrib/minizip/ioapi.h" 22 #include "third_party/zlib/contrib/minizip/ioapi.h"
17 #endif 23 #endif // defined(OS_POSIX)
24 #endif // defined(USE_SYSTEM_MINIZIP)
18 25
19 namespace { 26 namespace {
20 27
21 #if defined(OS_WIN) 28 #if defined(OS_WIN)
22 typedef struct { 29 typedef struct {
23 HANDLE hf; 30 HANDLE hf;
24 int error; 31 int error;
25 } WIN32FILE_IOWIN; 32 } WIN32FILE_IOWIN;
26 33
27 // This function is derived from third_party/minizip/iowin32.c. 34 // This function is derived from third_party/minizip/iowin32.c.
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 zip_func_ptrs = &zip_funcs; 271 zip_func_ptrs = &zip_funcs;
265 #endif 272 #endif
266 return zipOpen2(file_name_utf8.c_str(), 273 return zipOpen2(file_name_utf8.c_str(),
267 append_flag, 274 append_flag,
268 NULL, // global comment 275 NULL, // global comment
269 zip_func_ptrs); 276 zip_func_ptrs);
270 } 277 }
271 278
272 } // namespace internal 279 } // namespace internal
273 } // namespace zip 280 } // namespace zip
OLDNEW
« no previous file with comments | « chrome/common/zip_internal.h ('k') | chrome/common/zip_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698