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

Side by Side Diff: net/spdy/spdy_framer.cc

Issue 2130193002: Propagate SetDecoderHeaderTableDebugVisitor to the nested SpdyFramerDecoderAdapter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | net/spdy/spdy_framer_decoder_adapter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 3204 matching lines...) Expand 10 before | Expand all | Expand 10 after
3215 // Assume that the problem was the header block was too large for the 3215 // Assume that the problem was the header block was too large for the
3216 // visitor. 3216 // visitor.
3217 set_error(SPDY_CONTROL_PAYLOAD_TOO_LARGE); 3217 set_error(SPDY_CONTROL_PAYLOAD_TOO_LARGE);
3218 } 3218 }
3219 } 3219 }
3220 return read_successfully; 3220 return read_successfully;
3221 } 3221 }
3222 3222
3223 void SpdyFramer::SetDecoderHeaderTableDebugVisitor( 3223 void SpdyFramer::SetDecoderHeaderTableDebugVisitor(
3224 std::unique_ptr<HpackHeaderTable::DebugVisitorInterface> visitor) { 3224 std::unique_ptr<HpackHeaderTable::DebugVisitorInterface> visitor) {
3225 GetHpackDecoder()->SetHeaderTableDebugVisitor(std::move(visitor)); 3225 if (decoder_adapter_ != nullptr) {
3226 decoder_adapter_->SetDecoderHeaderTableDebugVisitor(std::move(visitor));
3227 } else {
3228 GetHpackDecoder()->SetHeaderTableDebugVisitor(std::move(visitor));
3229 }
3226 } 3230 }
3227 3231
3228 void SpdyFramer::SetEncoderHeaderTableDebugVisitor( 3232 void SpdyFramer::SetEncoderHeaderTableDebugVisitor(
3229 std::unique_ptr<HpackHeaderTable::DebugVisitorInterface> visitor) { 3233 std::unique_ptr<HpackHeaderTable::DebugVisitorInterface> visitor) {
3230 GetHpackEncoder()->SetHeaderTableDebugVisitor(std::move(visitor)); 3234 GetHpackEncoder()->SetHeaderTableDebugVisitor(std::move(visitor));
3231 } 3235 }
3232 3236
3233 void SpdyFramer::UpdateHeaderEncoderTableSize(uint32_t value) { 3237 void SpdyFramer::UpdateHeaderEncoderTableSize(uint32_t value) {
3234 GetHpackEncoder()->ApplyHeaderTableSizeSetting(value); 3238 GetHpackEncoder()->ApplyHeaderTableSizeSetting(value);
3235 } 3239 }
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
3307 #else 3311 #else
3308 WriteHeaderBlockToZ(&frame.header_block(), compressor); 3312 WriteHeaderBlockToZ(&frame.header_block(), compressor);
3309 #endif // defined(USE_SYSTEM_ZLIB) 3313 #endif // defined(USE_SYSTEM_ZLIB)
3310 3314
3311 int compressed_size = compressed_max_size - compressor->avail_out; 3315 int compressed_size = compressed_max_size - compressor->avail_out;
3312 builder->Seek(compressed_size); 3316 builder->Seek(compressed_size);
3313 builder->RewriteLength(*this); 3317 builder->RewriteLength(*this);
3314 } 3318 }
3315 3319
3316 } // namespace net 3320 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/spdy/spdy_framer_decoder_adapter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698