Refactor WebsiteSettings to operate on a SecurityInfo
[chromium-blink-merge.git] / net / tools / quic / quic_per_connection_packet_writer.cc
blob0a7d77a683772b6ab79ec242f2660230ab1fd35c
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_per_connection_packet_writer.h"
7 namespace net {
9 namespace tools {
11 QuicPerConnectionPacketWriter::QuicPerConnectionPacketWriter(
12 QuicPacketWriter* shared_writer,
13 QuicConnection* connection)
14 : shared_writer_(shared_writer),
15 connection_(connection) {
18 QuicPerConnectionPacketWriter::~QuicPerConnectionPacketWriter() {
21 WriteResult QuicPerConnectionPacketWriter::WritePacket(
22 const char* buffer,
23 size_t buf_len,
24 const IPAddressNumber& self_address,
25 const IPEndPoint& peer_address) {
26 return shared_writer_->WritePacket(buffer,
27 buf_len,
28 self_address,
29 peer_address);
32 bool QuicPerConnectionPacketWriter::IsWriteBlockedDataBuffered() const {
33 return shared_writer_->IsWriteBlockedDataBuffered();
36 bool QuicPerConnectionPacketWriter::IsWriteBlocked() const {
37 return shared_writer_->IsWriteBlocked();
40 void QuicPerConnectionPacketWriter::SetWritable() {
41 shared_writer_->SetWritable();
44 QuicByteCount QuicPerConnectionPacketWriter::GetMaxPacketSize(
45 const IPEndPoint& peer_address) const {
46 return shared_writer_->GetMaxPacketSize(peer_address);
49 } // namespace tools
51 } // namespace net