| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/http2/hpack/decoder/hpack_entry_collector.h" | 5 #include "net/http2/hpack/decoder/hpack_entry_collector.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 | 222 |
| 223 case HpackEntryType::kIndexedLiteralHeader: | 223 case HpackEntryType::kIndexedLiteralHeader: |
| 224 case HpackEntryType::kUnindexedLiteralHeader: | 224 case HpackEntryType::kUnindexedLiteralHeader: |
| 225 case HpackEntryType::kNeverIndexedLiteralHeader: | 225 case HpackEntryType::kNeverIndexedLiteralHeader: |
| 226 ASSERT_TRUE(value_.HasEnded()) << *this; | 226 ASSERT_TRUE(value_.HasEnded()) << *this; |
| 227 if (index_ != 0) { | 227 if (index_ != 0) { |
| 228 CHECK(name_.IsClear()); | 228 CHECK(name_.IsClear()); |
| 229 hbb->AppendNameIndexAndLiteralValue(header_type_, index_, | 229 hbb->AppendNameIndexAndLiteralValue(header_type_, index_, |
| 230 value_.huffman_encoded, value_.s); | 230 value_.huffman_encoded, value_.s); |
| 231 } else { | 231 } else { |
| 232 CHECK(name_.HasEnded()) << *this; | 232 CHECK(name_.HasEnded()); |
| 233 hbb->AppendLiteralNameAndValue(header_type_, name_.huffman_encoded, | 233 hbb->AppendLiteralNameAndValue(header_type_, name_.huffman_encoded, |
| 234 name_.s, value_.huffman_encoded, | 234 name_.s, value_.huffman_encoded, |
| 235 value_.s); | 235 value_.s); |
| 236 } | 236 } |
| 237 return; | 237 return; |
| 238 | 238 |
| 239 default: | 239 default: |
| 240 ADD_FAILURE() << *this; | 240 ADD_FAILURE() << *this; |
| 241 } | 241 } |
| 242 } | 242 } |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 bool operator!=(const HpackEntryCollector& a, const HpackEntryCollector& b) { | 308 bool operator!=(const HpackEntryCollector& a, const HpackEntryCollector& b) { |
| 309 return !(a == b); | 309 return !(a == b); |
| 310 } | 310 } |
| 311 | 311 |
| 312 std::ostream& operator<<(std::ostream& out, const HpackEntryCollector& v) { | 312 std::ostream& operator<<(std::ostream& out, const HpackEntryCollector& v) { |
| 313 return out << v.ToString(); | 313 return out << v.ToString(); |
| 314 } | 314 } |
| 315 | 315 |
| 316 } // namespace test | 316 } // namespace test |
| 317 } // namespace net | 317 } // namespace net |
| OLD | NEW |