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

Unified Diff: net/spdy/hpack/hpack_output_stream.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/spdy/hpack/hpack_output_stream.h ('k') | net/spdy/hpack/hpack_output_stream_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/hpack/hpack_output_stream.cc
diff --git a/net/spdy/hpack/hpack_output_stream.cc b/net/spdy/hpack/hpack_output_stream.cc
index d2342b194830c6a22e7d9907ecbe5c91c716e024..18aa4e6fb0074a70390f975ff213e900fb7b00ec 100644
--- a/net/spdy/hpack/hpack_output_stream.cc
+++ b/net/spdy/hpack/hpack_output_stream.cc
@@ -15,7 +15,7 @@ HpackOutputStream::HpackOutputStream() : bit_offset_(0) {}
HpackOutputStream::~HpackOutputStream() {}
-void HpackOutputStream::AppendBits(uint8 bits, size_t bit_size) {
+void HpackOutputStream::AppendBits(uint8_t bits, size_t bit_size) {
DCHECK_GT(bit_size, 0u);
DCHECK_LE(bit_size, 8u);
DCHECK_EQ(bits >> bit_size, 0);
@@ -46,12 +46,12 @@ void HpackOutputStream::AppendBytes(StringPiece buffer) {
buffer_.append(buffer.data(), buffer.size());
}
-void HpackOutputStream::AppendUint32(uint32 I) {
+void HpackOutputStream::AppendUint32(uint32_t I) {
// The algorithm below is adapted from the pseudocode in 6.1.
size_t N = 8 - bit_offset_;
- uint8 max_first_byte = static_cast<uint8>((1 << N) - 1);
+ uint8_t max_first_byte = static_cast<uint8_t>((1 << N) - 1);
if (I < max_first_byte) {
- AppendBits(static_cast<uint8>(I), N);
+ AppendBits(static_cast<uint8_t>(I), N);
} else {
AppendBits(max_first_byte, N);
I -= max_first_byte;
@@ -59,7 +59,7 @@ void HpackOutputStream::AppendUint32(uint32 I) {
buffer_.append(1, (I & 0x7f) | 0x80);
I >>= 7;
}
- AppendBits(static_cast<uint8>(I), 8);
+ AppendBits(static_cast<uint8_t>(I), 8);
}
}
« no previous file with comments | « net/spdy/hpack/hpack_output_stream.h ('k') | net/spdy/hpack/hpack_output_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698