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 "net/third_party/quiche/src/quic/core/frames/quic_path_response_frame.h"
6 
7 #include "net/third_party/quiche/src/quic/core/quic_constants.h"
8 #include "net/third_party/quiche/src/quic/platform/api/quic_bug_tracker.h"
9 #include "net/third_party/quiche/src/common/platform/api/quiche_text_utils.h"
10 
11 namespace quic {
12 
QuicPathResponseFrame()13 QuicPathResponseFrame::QuicPathResponseFrame()
14     : control_frame_id(kInvalidControlFrameId) {}
15 
QuicPathResponseFrame(QuicControlFrameId control_frame_id,const QuicPathFrameBuffer & data_buff)16 QuicPathResponseFrame::QuicPathResponseFrame(
17     QuicControlFrameId control_frame_id,
18     const QuicPathFrameBuffer& data_buff)
19     : control_frame_id(control_frame_id) {
20   memcpy(data_buffer.data(), data_buff.data(), data_buffer.size());
21 }
22 
~QuicPathResponseFrame()23 QuicPathResponseFrame::~QuicPathResponseFrame() {}
24 
operator <<(std::ostream & os,const QuicPathResponseFrame & frame)25 std::ostream& operator<<(std::ostream& os, const QuicPathResponseFrame& frame) {
26   os << "{ control_frame_id: " << frame.control_frame_id << ", data: "
27      << quiche::QuicheTextUtils::HexEncode(
28             reinterpret_cast<const char*>(frame.data_buffer.data()),
29             frame.data_buffer.size())
30      << " }\n";
31   return os;
32 }
33 
34 }  // namespace quic
35