OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/spdy_framer.h" | 5 #include "net/spdy/spdy_framer.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <ios> | 10 #include <ios> |
(...skipping 3247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3258 | 3258 |
3259 void SpdyFramer::SetEncoderHeaderTableDebugVisitor( | 3259 void SpdyFramer::SetEncoderHeaderTableDebugVisitor( |
3260 std::unique_ptr<HpackHeaderTable::DebugVisitorInterface> visitor) { | 3260 std::unique_ptr<HpackHeaderTable::DebugVisitorInterface> visitor) { |
3261 GetHpackEncoder()->SetHeaderTableDebugVisitor(std::move(visitor)); | 3261 GetHpackEncoder()->SetHeaderTableDebugVisitor(std::move(visitor)); |
3262 } | 3262 } |
3263 | 3263 |
3264 void SpdyFramer::UpdateHeaderEncoderTableSize(uint32_t value) { | 3264 void SpdyFramer::UpdateHeaderEncoderTableSize(uint32_t value) { |
3265 GetHpackEncoder()->ApplyHeaderTableSizeSetting(value); | 3265 GetHpackEncoder()->ApplyHeaderTableSizeSetting(value); |
3266 } | 3266 } |
3267 | 3267 |
| 3268 void SpdyFramer::UpdateHeaderDecoderTableSize(uint32_t value) { |
| 3269 GetHpackDecoder()->ApplyHeaderTableSizeSetting(value); |
| 3270 } |
| 3271 |
3268 size_t SpdyFramer::header_encoder_table_size() const { | 3272 size_t SpdyFramer::header_encoder_table_size() const { |
3269 if (hpack_encoder_ == nullptr) { | 3273 if (hpack_encoder_ == nullptr) { |
3270 return kDefaultHeaderTableSizeSetting; | 3274 return kDefaultHeaderTableSizeSetting; |
3271 } else { | 3275 } else { |
3272 return hpack_encoder_->CurrentHeaderTableSizeSetting(); | 3276 return hpack_encoder_->CurrentHeaderTableSizeSetting(); |
3273 } | 3277 } |
3274 } | 3278 } |
3275 | 3279 |
3276 void SpdyFramer::SerializeHeaderBlockWithoutCompression( | 3280 void SpdyFramer::SerializeHeaderBlockWithoutCompression( |
3277 SpdyFrameBuilder* builder, | 3281 SpdyFrameBuilder* builder, |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3338 #else | 3342 #else |
3339 WriteHeaderBlockToZ(&frame.header_block(), compressor); | 3343 WriteHeaderBlockToZ(&frame.header_block(), compressor); |
3340 #endif // defined(USE_SYSTEM_ZLIB) | 3344 #endif // defined(USE_SYSTEM_ZLIB) |
3341 | 3345 |
3342 int compressed_size = compressed_max_size - compressor->avail_out; | 3346 int compressed_size = compressed_max_size - compressor->avail_out; |
3343 builder->Seek(compressed_size); | 3347 builder->Seek(compressed_size); |
3344 builder->RewriteLength(*this); | 3348 builder->RewriteLength(*this); |
3345 } | 3349 } |
3346 | 3350 |
3347 } // namespace net | 3351 } // namespace net |
OLD | NEW |