OLD | NEW |
| (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/decoder/decode_status.h" | |
6 | |
7 #include "base/logging.h" | |
8 | |
9 namespace net { | |
10 | |
11 std::ostream& operator<<(std::ostream& out, DecodeStatus v) { | |
12 switch (v) { | |
13 case DecodeStatus::kDecodeDone: | |
14 return out << "DecodeDone"; | |
15 case DecodeStatus::kDecodeInProgress: | |
16 return out << "DecodeInProgress"; | |
17 case DecodeStatus::kDecodeError: | |
18 return out << "DecodeError"; | |
19 } | |
20 // Since the value doesn't come over the wire, only a programming bug should | |
21 // result in reaching this point. | |
22 int unknown = static_cast<int>(v); | |
23 LOG(DFATAL) << "Unknown DecodeStatus " << unknown << std::hex << unknown; | |
24 return out << "UnknownDecodeStatus(" << unknown << ")"; | |
25 } | |
26 | |
27 } // namespace net | |
OLD | NEW |