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

Unified Diff: net/spdy/hpack_input_stream.cc

Issue 265763011: Land recent SPDY changes (through 66310528) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
« no previous file with comments | « net/spdy/hpack_input_stream.h ('k') | net/spdy/hpack_input_stream_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/hpack_input_stream.cc
diff --git a/net/spdy/hpack_input_stream.cc b/net/spdy/hpack_input_stream.cc
index ee5fab0bdf35921815796bc470530a93a5cc92d2..87a3af4ec7829c54232ecf808f7a8c073749d060 100644
--- a/net/spdy/hpack_input_stream.cc
+++ b/net/spdy/hpack_input_stream.cc
@@ -30,15 +30,16 @@ bool HpackInputStream::MatchPrefixAndConsume(HpackPrefix prefix) {
DCHECK_GT(prefix.bit_size, 0u);
DCHECK_LE(prefix.bit_size, 8u);
- uint8 next_octet = 0;
- if (!PeekNextOctet(&next_octet))
+ uint32 peeked = 0;
+ size_t peeked_count = 0;
+
+ if (!PeekBits(&peeked_count, &peeked))
return false;
- if ((next_octet >> (8 - prefix.bit_size)) == prefix.bits) {
+ if ((peeked >> (32 - prefix.bit_size)) == prefix.bits) {
ConsumeBits(prefix.bit_size);
return true;
}
-
return false;
}
« no previous file with comments | « net/spdy/hpack_input_stream.h ('k') | net/spdy/hpack_input_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698