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

Side by Side Diff: net/http2/hpack/decoder/hpack_string_decoder.cc

Issue 2554683003: Revert of Add new HTTP/2 and HPACK decoder in net/http2/. (Closed)
Patch Set: Created 4 years 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "net/http2/hpack/decoder/hpack_string_decoder.h"
6
7 #include <sstream>
8
9 namespace net {
10
11 std::string HpackStringDecoder::DebugString() const {
12 std::stringstream ss;
13 ss << "HpackStringDecoder(state=" << StateToString(state_)
14 << ", length=" << length_decoder_.DebugString()
15 << ", remaining=" << remaining_
16 << ", huffman=" << (huffman_encoded_ ? "true)" : "false)");
17 return ss.str();
18 }
19
20 // static
21 std::string HpackStringDecoder::StateToString(StringDecoderState v) {
22 switch (v) {
23 case kStartDecodingLength:
24 return "kStartDecodingLength";
25 case kDecodingString:
26 return "kDecodingString";
27 case kResumeDecodingLength:
28 return "kResumeDecodingLength";
29 }
30 std::stringstream ss;
31 ss << "UNKNOWN_STATE(" << static_cast<uint32_t>(v) << ")";
32 return ss.str();
33 }
34
35 std::ostream& operator<<(std::ostream& out, const HpackStringDecoder& v) {
36 return out << v.DebugString();
37 }
38
39 } // namespace net
OLDNEW
« no previous file with comments | « net/http2/hpack/decoder/hpack_string_decoder.h ('k') | net/http2/hpack/decoder/hpack_string_decoder_listener.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698