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

Unified Diff: third_party/zlib/google/zip_reader.cc

Issue 1552513002: Switch to standard integer types in third_party/zlib/google/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/zlib/google/zip_reader.h ('k') | third_party/zlib/google/zip_reader_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/zlib/google/zip_reader.cc
diff --git a/third_party/zlib/google/zip_reader.cc b/third_party/zlib/google/zip_reader.cc
index 83086a3467fb0e21201edf36aaa80a8908ab839b..441a09835286c7813c0e93998a78390bba39a4ee 100644
--- a/third_party/zlib/google/zip_reader.cc
+++ b/third_party/zlib/google/zip_reader.cc
@@ -7,10 +7,12 @@
#include "base/bind.h"
#include "base/files/file.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/message_loop/message_loop.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/thread_task_runner_handle.h"
+#include "build/build_config.h"
#include "third_party/zlib/google/zip_internal.h"
#if defined(USE_SYSTEM_MINIZIP)
@@ -438,9 +440,9 @@ bool ZipReader::ExtractCurrentEntryToString(size_t max_read_bytes,
// correct. However, we need to assume that the uncompressed size could be
// incorrect therefore this function needs to read as much data as possible.
std::string contents;
- contents.reserve(static_cast<size_t>(std::min(
- static_cast<int64>(max_read_bytes),
- current_entry_info()->original_size())));
+ contents.reserve(
+ static_cast<size_t>(std::min(static_cast<int64_t>(max_read_bytes),
+ current_entry_info()->original_size())));
StringWriterDelegate writer(max_read_bytes, &contents);
if (!ExtractCurrentEntry(&writer))
@@ -476,7 +478,7 @@ void ZipReader::ExtractChunk(base::File output_file,
const SuccessCallback& success_callback,
const FailureCallback& failure_callback,
const ProgressCallback& progress_callback,
- const int64 offset) {
+ const int64_t offset) {
char buffer[internal::kZipBufSize];
const int num_bytes_read = unzReadCurrentFile(zip_file_,
@@ -497,7 +499,7 @@ void ZipReader::ExtractChunk(base::File output_file,
return;
}
- int64 current_progress = offset + num_bytes_read;
+ int64_t current_progress = offset + num_bytes_read;
progress_callback.Run(current_progress);
« no previous file with comments | « third_party/zlib/google/zip_reader.h ('k') | third_party/zlib/google/zip_reader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698