Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Side by Side Diff: net/tools/quic/quic_packet_writer_wrapper.cc

Issue 1662433002: Per-packet options now passed through to QuicPacketWriter, instead of (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@113054959
Patch Set: Fix comments for Patch Set 1 Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/tools/quic/quic_packet_writer_wrapper.h" 5 #include "net/tools/quic/quic_packet_writer_wrapper.h"
6 6
7 #include "net/quic/quic_types.h" 7 #include "net/quic/quic_types.h"
8 8
9 namespace net { 9 namespace net {
10 10
11 QuicPacketWriterWrapper::QuicPacketWriterWrapper() {} 11 QuicPacketWriterWrapper::QuicPacketWriterWrapper() {}
12 12
13 QuicPacketWriterWrapper::QuicPacketWriterWrapper(QuicPacketWriter* writer) 13 QuicPacketWriterWrapper::QuicPacketWriterWrapper(QuicPacketWriter* writer)
14 : writer_(writer) {} 14 : writer_(writer) {}
15 15
16 QuicPacketWriterWrapper::~QuicPacketWriterWrapper() {} 16 QuicPacketWriterWrapper::~QuicPacketWriterWrapper() {}
17 17
18 WriteResult QuicPacketWriterWrapper::WritePacket( 18 WriteResult QuicPacketWriterWrapper::WritePacket(
19 const char* buffer, 19 const char* buffer,
20 size_t buf_len, 20 size_t buf_len,
21 const IPAddressNumber& self_address, 21 const IPAddressNumber& self_address,
22 const IPEndPoint& peer_address) { 22 const IPEndPoint& peer_address,
23 return writer_->WritePacket(buffer, buf_len, self_address, peer_address); 23 PerPacketOptions* options) {
24 return writer_->WritePacket(buffer, buf_len, self_address, peer_address,
25 options);
24 } 26 }
25 27
26 bool QuicPacketWriterWrapper::IsWriteBlockedDataBuffered() const { 28 bool QuicPacketWriterWrapper::IsWriteBlockedDataBuffered() const {
27 return writer_->IsWriteBlockedDataBuffered(); 29 return writer_->IsWriteBlockedDataBuffered();
28 } 30 }
29 31
30 bool QuicPacketWriterWrapper::IsWriteBlocked() const { 32 bool QuicPacketWriterWrapper::IsWriteBlocked() const {
31 return writer_->IsWriteBlocked(); 33 return writer_->IsWriteBlocked();
32 } 34 }
33 35
34 void QuicPacketWriterWrapper::SetWritable() { 36 void QuicPacketWriterWrapper::SetWritable() {
35 writer_->SetWritable(); 37 writer_->SetWritable();
36 } 38 }
37 39
38 QuicByteCount QuicPacketWriterWrapper::GetMaxPacketSize( 40 QuicByteCount QuicPacketWriterWrapper::GetMaxPacketSize(
39 const IPEndPoint& peer_address) const { 41 const IPEndPoint& peer_address) const {
40 return writer_->GetMaxPacketSize(peer_address); 42 return writer_->GetMaxPacketSize(peer_address);
41 } 43 }
42 44
43 void QuicPacketWriterWrapper::set_writer(QuicPacketWriter* writer) { 45 void QuicPacketWriterWrapper::set_writer(QuicPacketWriter* writer) {
44 writer_.reset(writer); 46 writer_.reset(writer);
45 } 47 }
46 48
47 } // namespace net 49 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_packet_writer_wrapper.h ('k') | net/tools/quic/quic_per_connection_packet_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698