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

Unified Diff: net/base/elements_upload_data_stream.cc

Issue 1158923005: Use the exact-width integer types defined in <stdint.h> rather than (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tweak comments. Exclude mime_sniffer*. Rebase. Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: net/base/elements_upload_data_stream.cc
diff --git a/net/base/elements_upload_data_stream.cc b/net/base/elements_upload_data_stream.cc
index 06c3e3e9c2eb7ef9e9d6f0639f7463b38a71c831..e23f632ab383e139a38e8d3af918be4db8c374ab 100644
--- a/net/base/elements_upload_data_stream.cc
+++ b/net/base/elements_upload_data_stream.cc
@@ -16,7 +16,7 @@ namespace net {
ElementsUploadDataStream::ElementsUploadDataStream(
ScopedVector<UploadElementReader> element_readers,
- int64 identifier)
+ int64_t identifier)
: UploadDataStream(false, identifier),
element_readers_(element_readers.Pass()),
element_index_(0),
@@ -29,7 +29,7 @@ ElementsUploadDataStream::~ElementsUploadDataStream() {
scoped_ptr<UploadDataStream> ElementsUploadDataStream::CreateWithReader(
scoped_ptr<UploadElementReader> reader,
- int64 identifier) {
+ int64_t identifier) {
ScopedVector<UploadElementReader> readers;
readers.push_back(reader.Pass());
return scoped_ptr<UploadDataStream>(
@@ -82,7 +82,7 @@ int ElementsUploadDataStream::InitElements(size_t start_index) {
return result;
}
- uint64 total_size = 0;
+ uint64_t total_size = 0;
for (size_t i = 0; i < element_readers_.size(); ++i) {
total_size += element_readers_[i]->GetContentLength();
}
@@ -129,9 +129,9 @@ int ElementsUploadDataStream::ReadElements(
if (read_failed_) {
// If an error occured during read operation, then pad with zero.
// Otherwise the server will hang waiting for the rest of the data.
- int num_bytes_to_fill = static_cast<int>(std::min(
- static_cast<uint64>(buf->BytesRemaining()),
- size() - position() - buf->BytesConsumed()));
+ int num_bytes_to_fill =
+ static_cast<int>(std::min(static_cast<uint64_t>(buf->BytesRemaining()),
+ size() - position() - buf->BytesConsumed()));
DCHECK_GE(num_bytes_to_fill, 0);
memset(buf->data(), 0, num_bytes_to_fill);
buf->DidConsume(num_bytes_to_fill);

Powered by Google App Engine
This is Rietveld 408576698