xref: /aosp_15_r20/external/cronet/net/third_party/quiche/src/quiche/quic/core/frames/quic_new_token_frame.cc (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1 // Copyright (c) 2018 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 "quiche/quic/core/frames/quic_new_token_frame.h"
6 
7 #include "absl/strings/escaping.h"
8 #include "quiche/quic/platform/api/quic_logging.h"
9 
10 namespace quic {
11 
QuicNewTokenFrame(QuicControlFrameId control_frame_id,absl::string_view token)12 QuicNewTokenFrame::QuicNewTokenFrame(QuicControlFrameId control_frame_id,
13                                      absl::string_view token)
14     : control_frame_id(control_frame_id),
15       token(std::string(token.data(), token.length())) {}
16 
operator <<(std::ostream & os,const QuicNewTokenFrame & s)17 std::ostream& operator<<(std::ostream& os, const QuicNewTokenFrame& s) {
18   os << "{ control_frame_id: " << s.control_frame_id
19      << ", token: " << absl::BytesToHexString(s.token) << " }\n";
20   return os;
21 }
22 
23 }  // namespace quic
24