Index: net/spdy/hpack/hpack_input_stream.cc |
diff --git a/net/spdy/hpack/hpack_input_stream.cc b/net/spdy/hpack/hpack_input_stream.cc |
index 8b6e69eda84b3046102d6639bdd459822cd41e6f..f1869285e5a1c00c31bb0ba56106c978fe031530 100644 |
--- a/net/spdy/hpack/hpack_input_stream.cc |
+++ b/net/spdy/hpack/hpack_input_stream.cc |
@@ -6,7 +6,6 @@ |
#include <algorithm> |
-#include "base/basictypes.h" |
#include "base/logging.h" |
namespace net { |
@@ -14,7 +13,7 @@ namespace net { |
using base::StringPiece; |
using std::string; |
-HpackInputStream::HpackInputStream(uint32 max_string_literal_size, |
+HpackInputStream::HpackInputStream(uint32_t max_string_literal_size, |
StringPiece buffer) |
: max_string_literal_size_(max_string_literal_size), |
buffer_(buffer), |
@@ -30,7 +29,7 @@ bool HpackInputStream::MatchPrefixAndConsume(HpackPrefix prefix) { |
DCHECK_GT(prefix.bit_size, 0u); |
DCHECK_LE(prefix.bit_size, 8u); |
- uint32 peeked = 0; |
+ uint32_t peeked = 0; |
size_t peeked_count = 0; |
if (!PeekBits(&peeked_count, &peeked)) { |
@@ -44,7 +43,7 @@ bool HpackInputStream::MatchPrefixAndConsume(HpackPrefix prefix) { |
return false; |
} |
-bool HpackInputStream::PeekNextOctet(uint8* next_octet) { |
+bool HpackInputStream::PeekNextOctet(uint8_t* next_octet) { |
if ((bit_offset_ > 0) || buffer_.empty()) { |
return false; |
} |
@@ -53,7 +52,7 @@ bool HpackInputStream::PeekNextOctet(uint8* next_octet) { |
return true; |
} |
-bool HpackInputStream::DecodeNextOctet(uint8* next_octet) { |
+bool HpackInputStream::DecodeNextOctet(uint8_t* next_octet) { |
if (!PeekNextOctet(next_octet)) { |
return false; |
} |
@@ -62,7 +61,7 @@ bool HpackInputStream::DecodeNextOctet(uint8* next_octet) { |
return true; |
} |
-bool HpackInputStream::DecodeNextUint32(uint32* I) { |
+bool HpackInputStream::DecodeNextUint32(uint32_t* I) { |
size_t N = 8 - bit_offset_; |
DCHECK_GT(N, 0u); |
DCHECK_LE(N, 8u); |
@@ -71,8 +70,8 @@ bool HpackInputStream::DecodeNextUint32(uint32* I) { |
*I = 0; |
- uint8 next_marker = (1 << N) - 1; |
- uint8 next_octet = 0; |
+ uint8_t next_marker = (1 << N) - 1; |
+ uint8_t next_octet = 0; |
if (!DecodeNextOctet(&next_octet)) { |
return false; |
} |
@@ -81,13 +80,13 @@ bool HpackInputStream::DecodeNextUint32(uint32* I) { |
bool has_more = (*I == next_marker); |
size_t shift = 0; |
while (has_more && (shift < 32)) { |
- uint8 next_octet = 0; |
+ uint8_t next_octet = 0; |
if (!DecodeNextOctet(&next_octet)) { |
return false; |
} |
has_more = (next_octet & 0x80) != 0; |
next_octet &= 0x7f; |
- uint32 addend = next_octet << shift; |
+ uint32_t addend = next_octet << shift; |
// Check for overflow. |
if ((addend >> shift) != next_octet) { |
return false; |
@@ -100,7 +99,7 @@ bool HpackInputStream::DecodeNextUint32(uint32* I) { |
} |
bool HpackInputStream::DecodeNextIdentityString(StringPiece* str) { |
- uint32 size = 0; |
+ uint32_t size = 0; |
if (!DecodeNextUint32(&size)) { |
return false; |
} |
@@ -120,7 +119,7 @@ bool HpackInputStream::DecodeNextIdentityString(StringPiece* str) { |
bool HpackInputStream::DecodeNextHuffmanString(const HpackHuffmanTable& table, |
string* str) { |
- uint32 encoded_size = 0; |
+ uint32_t encoded_size = 0; |
if (!DecodeNextUint32(&encoded_size)) { |
return false; |
} |
@@ -137,7 +136,7 @@ bool HpackInputStream::DecodeNextHuffmanString(const HpackHuffmanTable& table, |
return table.DecodeString(&bounded_reader, max_string_literal_size_, str); |
} |
-bool HpackInputStream::PeekBits(size_t* peeked_count, uint32* out) const { |
+bool HpackInputStream::PeekBits(size_t* peeked_count, uint32_t* out) const { |
size_t byte_offset = (bit_offset_ + *peeked_count) / 8; |
size_t bit_offset = (bit_offset_ + *peeked_count) % 8; |
@@ -148,7 +147,7 @@ bool HpackInputStream::PeekBits(size_t* peeked_count, uint32* out) const { |
// and the remaining unfilled bits of |out|. |
size_t bits_to_read = std::min(32 - *peeked_count, 8 - bit_offset); |
- uint32 new_bits = static_cast<uint32>(buffer_[byte_offset]); |
+ uint32_t new_bits = static_cast<uint32_t>(buffer_[byte_offset]); |
// Shift byte remainder to most-signifcant bits of |new_bits|. |
// This drops the leading |bit_offset| bits of the byte. |
new_bits = new_bits << (24 + bit_offset); |