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

Unified Diff: net/filter/gzip_header.cc

Issue 1535363003: Switch to standard integer types in net/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: stddef 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 | « net/filter/gzip_header.h ('k') | net/filter/mock_filter_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/filter/gzip_header.cc
diff --git a/net/filter/gzip_header.cc b/net/filter/gzip_header.cc
index f4aca6b1518f3588ab2ff585c9a8ff8ac0d275cd..36a1c866a90b25bf8d096faaebf213b1f3b258cd 100644
--- a/net/filter/gzip_header.cc
+++ b/net/filter/gzip_header.cc
@@ -11,7 +11,7 @@
namespace net {
-const uint8 GZipHeader::magic[] = { 0x1f, 0x8b };
+const uint8_t GZipHeader::magic[] = {0x1f, 0x8b};
GZipHeader::GZipHeader() {
Reset();
@@ -29,8 +29,8 @@ void GZipHeader::Reset() {
GZipHeader::Status GZipHeader::ReadMore(const char* inbuf, int inbuf_len,
const char** header_end) {
DCHECK_GE(inbuf_len, 0);
- const uint8* pos = reinterpret_cast<const uint8*>(inbuf);
- const uint8* const end = pos + inbuf_len;
+ const uint8_t* pos = reinterpret_cast<const uint8_t*>(inbuf);
+ const uint8_t* const end = pos + inbuf_len;
while ( pos < end ) {
switch ( state_ ) {
@@ -105,9 +105,8 @@ GZipHeader::Status GZipHeader::ReadMore(const char* inbuf, int inbuf_len,
case IN_FEXTRA: {
// Grab the rest of the bytes in the extra field, or as many
// of them as are actually present so far.
- const uint16 num_extra_bytes = static_cast<uint16>(std::min(
- static_cast<ptrdiff_t>(extra_length_),
- (end - pos)));
+ const uint16_t num_extra_bytes = static_cast<uint16_t>(
+ std::min(static_cast<ptrdiff_t>(extra_length_), (end - pos)));
pos += num_extra_bytes;
extra_length_ -= num_extra_bytes;
if ( extra_length_ == 0 ) {
@@ -123,7 +122,7 @@ GZipHeader::Status GZipHeader::ReadMore(const char* inbuf, int inbuf_len,
break;
}
// See if we can find the end of the \0-terminated FNAME field.
- pos = reinterpret_cast<const uint8*>(memchr(pos, '\0', (end - pos)));
+ pos = reinterpret_cast<const uint8_t*>(memchr(pos, '\0', (end - pos)));
if ( pos != NULL ) {
pos++; // advance past the '\0'
flags_ &= ~FLAG_FNAME; // we're done with the FNAME stuff
@@ -139,7 +138,7 @@ GZipHeader::Status GZipHeader::ReadMore(const char* inbuf, int inbuf_len,
break;
}
// See if we can find the end of the \0-terminated FCOMMENT field.
- pos = reinterpret_cast<const uint8*>(memchr(pos, '\0', (end - pos)));
+ pos = reinterpret_cast<const uint8_t*>(memchr(pos, '\0', (end - pos)));
if ( pos != NULL ) {
pos++; // advance past the '\0'
flags_ &= ~FLAG_FCOMMENT; // we're done with the FCOMMENT stuff
« no previous file with comments | « net/filter/gzip_header.h ('k') | net/filter/mock_filter_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698