| OLD | NEW |
| 1 // Copyright 2017 The Chromium OS Authors. All rights reserved. | 1 // Copyright 2017 The Chromium OS 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 "compressor_archive_libarchive.h" | 5 #include "compressor_archive_minizip.h" |
| 6 | 6 |
| 7 #include <cerrno> | 7 #include <cerrno> |
| 8 #include <cstring> | 8 #include <cstring> |
| 9 | 9 |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| 11 #include "ppapi/cpp/logging.h" | 11 #include "ppapi/cpp/logging.h" |
| 12 | 12 |
| 13 namespace compressor_archive_functions { | 13 namespace compressor_archive_functions { |
| 14 | 14 |
| 15 // Called when minizip tries to open a zip archive file. We do nothing here | 15 // Called when minizip tries to open a zip archive file. We do nothing here |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 return false /* Error */; | 234 return false /* Error */; |
| 235 } | 235 } |
| 236 if (!has_error) { | 236 if (!has_error) { |
| 237 if (compressor_stream()->Flush() < 0) { | 237 if (compressor_stream()->Flush() < 0) { |
| 238 set_error_message(compressor_archive_constants::kCloseArchiveError); | 238 set_error_message(compressor_archive_constants::kCloseArchiveError); |
| 239 return false /* Error */; | 239 return false /* Error */; |
| 240 } | 240 } |
| 241 } | 241 } |
| 242 return true /* Success */; | 242 return true /* Success */; |
| 243 } | 243 } |
| OLD | NEW |