| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/logging.h" |
| 8 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/utf_string_conversions.h" |
| 9 #include "net/base/file_stream.h" | 11 #include "net/base/file_stream.h" |
| 10 #include "third_party/zlib/contrib/minizip/unzip.h" | 12 #include "third_party/zlib/contrib/minizip/unzip.h" |
| 11 #include "third_party/zlib/contrib/minizip/zip.h" | 13 #include "third_party/zlib/contrib/minizip/zip.h" |
| 12 #if defined(OS_WIN) | 14 #if defined(OS_WIN) |
| 13 #include "third_party/zlib/contrib/minizip/iowin32.h" | 15 #include "third_party/zlib/contrib/minizip/iowin32.h" |
| 14 #endif | 16 #endif |
| 15 | 17 |
| 16 static const int kZipMaxPath = 256; | 18 static const int kZipMaxPath = 256; |
| 17 static const int kZipBufSize = 8192; | 19 static const int kZipBufSize = 8192; |
| 18 | 20 |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 } | 304 } |
| 303 } | 305 } |
| 304 | 306 |
| 305 if (ZIP_OK != zipClose(zip_file, NULL)) { // global comment | 307 if (ZIP_OK != zipClose(zip_file, NULL)) { // global comment |
| 306 LOG(ERROR) << "Error closing zip file " << dest_file_str; | 308 LOG(ERROR) << "Error closing zip file " << dest_file_str; |
| 307 return false; | 309 return false; |
| 308 } | 310 } |
| 309 | 311 |
| 310 return success; | 312 return success; |
| 311 } | 313 } |
| OLD | NEW |