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

Unified Diff: net/quic/quic_connection.cc

Issue 553583007: QUIC cleanup to remove an unused bool argument in SendOrQueuePacket and (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « net/quic/quic_connection.h ('k') | net/quic/quic_packet_generator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_connection.cc
diff --git a/net/quic/quic_connection.cc b/net/quic/quic_connection.cc
index 47361109c6a924535275644f233353e0bcb29978..8d2d25b1b86282fcc49695605207361b5f06affe 100644
--- a/net/quic/quic_connection.cc
+++ b/net/quic/quic_connection.cc
@@ -1495,7 +1495,7 @@ void QuicConnection::OnWriteError(int error_code) {
CloseConnection(QUIC_PACKET_WRITE_ERROR, false);
}
-bool QuicConnection::OnSerializedPacket(
+void QuicConnection::OnSerializedPacket(
const SerializedPacket& serialized_packet) {
if (serialized_packet.retransmittable_frames) {
serialized_packet.retransmittable_frames->
@@ -1504,9 +1504,7 @@ bool QuicConnection::OnSerializedPacket(
sent_packet_manager_.OnSerializedPacket(serialized_packet);
// The TransmissionType is NOT_RETRANSMISSION because all retransmissions
// serialize packets and invoke SendOrQueuePacket directly.
- return SendOrQueuePacket(encryption_level_,
- serialized_packet,
- NOT_RETRANSMISSION);
+ SendOrQueuePacket(encryption_level_, serialized_packet, NOT_RETRANSMISSION);
}
void QuicConnection::OnCongestionWindowChange(QuicByteCount congestion_window) {
@@ -1518,13 +1516,13 @@ void QuicConnection::OnHandshakeComplete() {
sent_packet_manager_.SetHandshakeConfirmed();
}
-bool QuicConnection::SendOrQueuePacket(EncryptionLevel level,
+void QuicConnection::SendOrQueuePacket(EncryptionLevel level,
const SerializedPacket& packet,
TransmissionType transmission_type) {
// The caller of this function is responsible for checking CanWrite().
if (packet.packet == NULL) {
LOG(DFATAL) << "NULL packet passed in to SendOrQueuePacket";
- return true;
+ return;
}
sent_entropy_manager_.RecordPacketEntropyHash(packet.sequence_number,
@@ -1534,10 +1532,9 @@ bool QuicConnection::SendOrQueuePacket(EncryptionLevel level,
<< "Packets should only be left queued if we're write blocked.";
if (WritePacket(queued_packet)) {
delete packet.packet;
- return true;
+ } else {
+ queued_packets_.push_back(queued_packet);
}
- queued_packets_.push_back(queued_packet);
- return false;
}
void QuicConnection::UpdateStopWaiting(QuicStopWaitingFrame* stop_waiting) {
« no previous file with comments | « net/quic/quic_connection.h ('k') | net/quic/quic_packet_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698