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

Side by Side Diff: net/spdy/hpack/hpack_decoder.cc

Issue 2663203002: Fix uninitialized fields in hpack code. (Closed)
Patch Set: Created 3 years, 10 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/hpack/hpack_entry.cc » ('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 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/hpack_decoder.h" 5 #include "net/spdy/hpack/hpack_decoder.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "net/spdy/hpack/hpack_constants.h" 10 #include "net/spdy/hpack/hpack_constants.h"
11 #include "net/spdy/hpack/hpack_entry.h" 11 #include "net/spdy/hpack/hpack_entry.h"
12 #include "net/spdy/spdy_flags.h" 12 #include "net/spdy/spdy_flags.h"
13 13
14 namespace net { 14 namespace net {
15 15
16 using base::StringPiece; 16 using base::StringPiece;
17 using std::string; 17 using std::string;
18 18
19 HpackDecoder::HpackDecoder() 19 HpackDecoder::HpackDecoder()
20 : handler_(nullptr), 20 : handler_(nullptr),
21 total_header_bytes_(0), 21 total_header_bytes_(0),
22 total_parsed_bytes_(0), 22 total_parsed_bytes_(0),
23 header_block_started_(false) {} 23 header_block_started_(false),
24 size_updates_seen_(0),
25 size_updates_allowed_(true),
26 incremental_decode_(false) {}
27
24 28
25 HpackDecoder::~HpackDecoder() {} 29 HpackDecoder::~HpackDecoder() {}
26 30
27 void HpackDecoder::ApplyHeaderTableSizeSetting(size_t size_setting) { 31 void HpackDecoder::ApplyHeaderTableSizeSetting(size_t size_setting) {
28 header_table_.SetSettingsHeaderTableSize(size_setting); 32 header_table_.SetSettingsHeaderTableSize(size_setting);
29 } 33 }
30 34
31 void HpackDecoder::HandleControlFrameHeadersStart( 35 void HpackDecoder::HandleControlFrameHeadersStart(
32 SpdyHeadersHandlerInterface* handler) { 36 SpdyHeadersHandlerInterface* handler) {
33 handler_ = handler; 37 handler_ = handler;
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 } else if (input_stream->MatchPrefixAndConsume( 271 } else if (input_stream->MatchPrefixAndConsume(
268 kStringLiteralIdentityEncoded)) { 272 kStringLiteralIdentityEncoded)) {
269 return input_stream->DecodeNextIdentityString(output); 273 return input_stream->DecodeNextIdentityString(output);
270 } else { 274 } else {
271 DVLOG(1) << "String literal is neither Huffman nor identity encoded!"; 275 DVLOG(1) << "String literal is neither Huffman nor identity encoded!";
272 return false; 276 return false;
273 } 277 }
274 } 278 }
275 279
276 } // namespace net 280 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/spdy/hpack/hpack_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698