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

Unified Diff: net/base/upload_bytes_element_reader.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/upload_bytes_element_reader.cc
diff --git a/net/base/upload_bytes_element_reader.cc b/net/base/upload_bytes_element_reader.cc
index 44f61f4f8490b9738133812d388a2d2a69abcd38..fd74dd80e55a3fb0f6dff4ba6ac7c1dba90d0e37 100644
--- a/net/base/upload_bytes_element_reader.cc
+++ b/net/base/upload_bytes_element_reader.cc
@@ -12,10 +12,8 @@
namespace net {
UploadBytesElementReader::UploadBytesElementReader(const char* bytes,
- uint64 length)
- : bytes_(bytes),
- length_(length),
- offset_(0) {
+ uint64_t length)
+ : bytes_(bytes), length_(length), offset_(0) {
}
UploadBytesElementReader::~UploadBytesElementReader() {
@@ -31,11 +29,11 @@ int UploadBytesElementReader::Init(const CompletionCallback& callback) {
return OK;
}
-uint64 UploadBytesElementReader::GetContentLength() const {
+uint64_t UploadBytesElementReader::GetContentLength() const {
return length_;
}
-uint64 UploadBytesElementReader::BytesRemaining() const {
+uint64_t UploadBytesElementReader::BytesRemaining() const {
return length_ - offset_;
}
@@ -49,7 +47,7 @@ int UploadBytesElementReader::Read(IOBuffer* buf,
DCHECK_LT(0, buf_length);
const int num_bytes_to_read = static_cast<int>(
- std::min(BytesRemaining(), static_cast<uint64>(buf_length)));
+ std::min(BytesRemaining(), static_cast<uint64_t>(buf_length)));
// Check if we have anything to copy first, because we are getting
// the address of an element in |bytes_| and that will throw an

Powered by Google App Engine
This is Rietveld 408576698