Home
last modified time | relevance | path

Searched refs:peeked_count (Results 1 – 3 of 3) sorted by relevance

/external/chromium_org/net/spdy/
Dhpack_input_stream.cc34 size_t peeked_count = 0; in MatchPrefixAndConsume() local
36 if (!PeekBits(&peeked_count, &peeked)) in MatchPrefixAndConsume()
131 bool HpackInputStream::PeekBits(size_t* peeked_count, uint32* out) { in PeekBits() argument
132 size_t byte_offset = (bit_offset_ + *peeked_count) / 8; in PeekBits()
133 size_t bit_offset = (bit_offset_ + *peeked_count) % 8; in PeekBits()
135 if (*peeked_count >= 32 || byte_offset >= buffer_.size()) { in PeekBits()
140 size_t bits_to_read = std::min(32 - *peeked_count, 8 - bit_offset); in PeekBits()
147 new_bits = new_bits >> *peeked_count; in PeekBits()
152 *peeked_count += bits_to_read; in PeekBits()
Dhpack_input_stream_test.cc553 size_t peeked_count = 0; in TEST_F() local
556 EXPECT_TRUE(input_stream.PeekBits(&peeked_count, &bits)); in TEST_F()
558 EXPECT_EQ(8u, peeked_count); in TEST_F()
561 EXPECT_TRUE(input_stream.PeekBits(&peeked_count, &bits)); in TEST_F()
563 EXPECT_EQ(16u, peeked_count); in TEST_F()
567 peeked_count -= 5; in TEST_F()
569 EXPECT_EQ(11u, peeked_count); in TEST_F()
572 EXPECT_TRUE(input_stream.PeekBits(&peeked_count, &bits)); in TEST_F()
574 EXPECT_EQ(19u, peeked_count); in TEST_F()
577 EXPECT_TRUE(input_stream.PeekBits(&peeked_count, &bits)); in TEST_F()
[all …]
Dhpack_input_stream.h51 bool PeekBits(size_t* peeked_count, uint32* out);