blob: 3d319078e9d0f190ffa06f560ee43fac46c49de5 [file] [log] [blame]
QUICHE teamfd50a402018-12-07 22:54:05 -05001// 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/third_party/quiche/src/http2/decoder/decode_status.h"
6
QUICHE teamfd50a402018-12-07 22:54:05 -05007#include "net/third_party/quiche/src/http2/platform/api/http2_bug_tracker.h"
QUICHE team61940b42019-03-07 23:32:27 -05008#include "net/third_party/quiche/src/http2/platform/api/http2_logging.h"
QUICHE teamfd50a402018-12-07 22:54:05 -05009
10namespace http2 {
11
12std::ostream& operator<<(std::ostream& out, DecodeStatus v) {
13 switch (v) {
14 case DecodeStatus::kDecodeDone:
15 return out << "DecodeDone";
16 case DecodeStatus::kDecodeInProgress:
17 return out << "DecodeInProgress";
18 case DecodeStatus::kDecodeError:
19 return out << "DecodeError";
20 }
21 // Since the value doesn't come over the wire, only a programming bug should
22 // result in reaching this point.
23 int unknown = static_cast<int>(v);
24 HTTP2_BUG << "Unknown DecodeStatus " << unknown;
25 return out << "DecodeStatus(" << unknown << ")";
26}
27
28} // namespace http2