Switch global error menu icon to vectorized MD asset
[chromium-blink-merge.git] / net / tools / quic / quic_packet_writer_wrapper.cc
blobf3e5d8316a8a8a822cf42d7d80b268713992e0d4
1 // Copyright 2014 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.
5 #include "net/tools/quic/quic_packet_writer_wrapper.h"
7 #include "net/quic/quic_types.h"
9 namespace net {
10 namespace tools {
12 QuicPacketWriterWrapper::QuicPacketWriterWrapper() {}
14 QuicPacketWriterWrapper::QuicPacketWriterWrapper(QuicPacketWriter* writer)
15 : writer_(writer) {}
17 QuicPacketWriterWrapper::~QuicPacketWriterWrapper() {}
19 WriteResult QuicPacketWriterWrapper::WritePacket(
20 const char* buffer,
21 size_t buf_len,
22 const IPAddressNumber& self_address,
23 const IPEndPoint& peer_address) {
24 return writer_->WritePacket(buffer, buf_len, self_address, peer_address);
27 bool QuicPacketWriterWrapper::IsWriteBlockedDataBuffered() const {
28 return writer_->IsWriteBlockedDataBuffered();
31 bool QuicPacketWriterWrapper::IsWriteBlocked() const {
32 return writer_->IsWriteBlocked();
35 void QuicPacketWriterWrapper::SetWritable() {
36 writer_->SetWritable();
39 void QuicPacketWriterWrapper::set_writer(QuicPacketWriter* writer) {
40 writer_.reset(writer);
43 } // namespace tools
44 } // namespace net