OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "third_party/zlib/google/zip_reader.h" | 5 #include "third_party/zlib/google/zip_reader.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/files/file.h" | 10 #include "base/files/file.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
14 #include "base/strings/string_util.h" | 14 #include "base/strings/string_util.h" |
15 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
16 #include "base/thread_task_runner_handle.h" | 16 #include "base/threading/thread_task_runner_handle.h" |
17 #include "build/build_config.h" | 17 #include "build/build_config.h" |
18 #include "third_party/zlib/google/zip_internal.h" | 18 #include "third_party/zlib/google/zip_internal.h" |
19 | 19 |
20 #if defined(USE_SYSTEM_MINIZIP) | 20 #if defined(USE_SYSTEM_MINIZIP) |
21 #include <minizip/unzip.h> | 21 #include <minizip/unzip.h> |
22 #else | 22 #else |
23 #include "third_party/zlib/contrib/minizip/unzip.h" | 23 #include "third_party/zlib/contrib/minizip/unzip.h" |
24 #if defined(OS_WIN) | 24 #if defined(OS_WIN) |
25 #include "third_party/zlib/contrib/minizip/iowin32.h" | 25 #include "third_party/zlib/contrib/minizip/iowin32.h" |
26 #endif // defined(OS_WIN) | 26 #endif // defined(OS_WIN) |
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 } | 529 } |
530 | 530 |
531 bool FileWriterDelegate::WriteBytes(const char* data, int num_bytes) { | 531 bool FileWriterDelegate::WriteBytes(const char* data, int num_bytes) { |
532 int bytes_written = file_->WriteAtCurrentPos(data, num_bytes); | 532 int bytes_written = file_->WriteAtCurrentPos(data, num_bytes); |
533 if (bytes_written > 0) | 533 if (bytes_written > 0) |
534 file_length_ += bytes_written; | 534 file_length_ += bytes_written; |
535 return bytes_written == num_bytes; | 535 return bytes_written == num_bytes; |
536 } | 536 } |
537 | 537 |
538 } // namespace zip | 538 } // namespace zip |
OLD | NEW |