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

Unified Diff: net/quic/quic_per_connection_packet_writer.cc

Issue 467963002: Refactoring: Create per-connection packet writers in QuicDispatcher. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: net/quic/quic_per_connection_packet_writer.cc
diff --git a/net/quic/quic_per_connection_packet_writer.cc b/net/quic/quic_per_connection_packet_writer.cc
index 6347bc201df632e68de7aac05a19a63584179edf..4185a4f6377893107424636f51e1d2008dee608c 100644
--- a/net/quic/quic_per_connection_packet_writer.cc
+++ b/net/quic/quic_per_connection_packet_writer.cc
@@ -10,8 +10,11 @@
namespace net {
QuicPerConnectionPacketWriter::QuicPerConnectionPacketWriter(
- QuicServerPacketWriter* writer)
- : weak_factory_(this), writer_(writer) {
+ QuicServerPacketWriter* shared_writer,
+ QuicConnection* connection)
+ : weak_factory_(this),
+ shared_writer_(shared_writer),
+ connection_(connection) {
}
QuicPerConnectionPacketWriter::~QuicPerConnectionPacketWriter() {
@@ -22,7 +25,7 @@ WriteResult QuicPerConnectionPacketWriter::WritePacket(
size_t buf_len,
const IPAddressNumber& self_address,
const IPEndPoint& peer_address) {
- return writer_->WritePacketWithCallback(
+ return shared_writer_->WritePacketWithCallback(
buffer,
buf_len,
self_address,
@@ -32,15 +35,15 @@ WriteResult QuicPerConnectionPacketWriter::WritePacket(
}
bool QuicPerConnectionPacketWriter::IsWriteBlockedDataBuffered() const {
- return writer_->IsWriteBlockedDataBuffered();
+ return shared_writer_->IsWriteBlockedDataBuffered();
}
bool QuicPerConnectionPacketWriter::IsWriteBlocked() const {
- return writer_->IsWriteBlocked();
+ return shared_writer_->IsWriteBlocked();
}
void QuicPerConnectionPacketWriter::SetWritable() {
- writer_->SetWritable();
+ shared_writer_->SetWritable();
}
void QuicPerConnectionPacketWriter::OnWriteComplete(WriteResult result) {

Powered by Google App Engine
This is Rietveld 408576698