OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/spdy/hpack_decoder.h" | 5 #include "net/spdy/hpack_decoder.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "net/spdy/hpack_constants.h" | 9 #include "net/spdy/hpack_constants.h" |
10 #include "net/spdy/hpack_output_stream.h" | 10 #include "net/spdy/hpack_output_stream.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 headers_block_buffer_.clear(); | 53 headers_block_buffer_.clear(); |
54 return false; | 54 return false; |
55 } | 55 } |
56 } | 56 } |
57 headers_block_buffer_.clear(); | 57 headers_block_buffer_.clear(); |
58 | 58 |
59 // Emit everything in the reference set that hasn't already been emitted. | 59 // Emit everything in the reference set that hasn't already been emitted. |
60 // Also clear entry state for the next decoded headers block. | 60 // Also clear entry state for the next decoded headers block. |
61 // TODO(jgraettinger): We may need to revisit the order in which headers | 61 // TODO(jgraettinger): We may need to revisit the order in which headers |
62 // are emitted (b/14051713). | 62 // are emitted (b/14051713). |
63 for (HpackEntry::OrderedSet::const_iterator it = | 63 for (HpackHeaderTable::OrderedEntrySet::const_iterator it = |
64 header_table_.reference_set().begin(); | 64 header_table_.reference_set().begin(); |
65 it != header_table_.reference_set().end(); ++it) { | 65 it != header_table_.reference_set().end(); ++it) { |
66 HpackEntry* entry = *it; | 66 HpackEntry* entry = *it; |
67 | 67 |
68 if (entry->state() == kNoState) { | 68 if (entry->state() == kNoState) { |
69 HandleHeaderRepresentation(entry->name(), entry->value()); | 69 HandleHeaderRepresentation(entry->name(), entry->value()); |
70 } else { | 70 } else { |
71 entry->set_state(kNoState); | 71 entry->set_state(kNoState); |
72 } | 72 } |
73 } | 73 } |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 return result; | 231 return result; |
232 } else if (input_stream->MatchPrefixAndConsume( | 232 } else if (input_stream->MatchPrefixAndConsume( |
233 kStringLiteralIdentityEncoded)) { | 233 kStringLiteralIdentityEncoded)) { |
234 return input_stream->DecodeNextIdentityString(output); | 234 return input_stream->DecodeNextIdentityString(output); |
235 } else { | 235 } else { |
236 return false; | 236 return false; |
237 } | 237 } |
238 } | 238 } |
239 | 239 |
240 } // namespace net | 240 } // namespace net |
OLD | NEW |