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

Side by Side Diff: net/quic/quic_connection.cc

Issue 287583002: Revert of Fix a bug where if a crypto packet is spuriously retransmitted (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_connection.h ('k') | net/quic/quic_sent_packet_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/quic/quic_connection.h" 5 #include "net/quic/quic_connection.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 #include <sys/types.h> 8 #include <sys/types.h>
9 #include <algorithm> 9 #include <algorithm>
10 #include <iterator> 10 #include <iterator>
(...skipping 1283 matching lines...) Expand 10 before | Expand all | Expand 10 after
1294 } 1294 }
1295 } 1295 }
1296 1296
1297 void QuicConnection::RetransmitUnackedPackets( 1297 void QuicConnection::RetransmitUnackedPackets(
1298 RetransmissionType retransmission_type) { 1298 RetransmissionType retransmission_type) {
1299 sent_packet_manager_.RetransmitUnackedPackets(retransmission_type); 1299 sent_packet_manager_.RetransmitUnackedPackets(retransmission_type);
1300 1300
1301 WriteIfNotBlocked(); 1301 WriteIfNotBlocked();
1302 } 1302 }
1303 1303
1304 void QuicConnection::DiscardUnencryptedPackets() { 1304 void QuicConnection::NeuterUnencryptedPackets() {
1305 sent_packet_manager_.DiscardUnencryptedPackets(); 1305 sent_packet_manager_.NeuterUnencryptedPackets();
1306 // This may have changed the retransmission timer, so re-arm it. 1306 // This may have changed the retransmission timer, so re-arm it.
1307 retransmission_alarm_->Cancel(); 1307 retransmission_alarm_->Cancel();
1308 QuicTime retransmission_time = sent_packet_manager_.GetRetransmissionTime(); 1308 QuicTime retransmission_time = sent_packet_manager_.GetRetransmissionTime();
1309 if (retransmission_time != QuicTime::Zero()) { 1309 if (retransmission_time != QuicTime::Zero()) {
1310 retransmission_alarm_->Set(retransmission_time); 1310 retransmission_alarm_->Set(retransmission_time);
1311 } 1311 }
1312 } 1312 }
1313 1313
1314 bool QuicConnection::ShouldGeneratePacket( 1314 bool QuicConnection::ShouldGeneratePacket(
1315 TransmissionType transmission_type, 1315 TransmissionType transmission_type,
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after
1998 // If we changed the generator's batch state, restore original batch state. 1998 // If we changed the generator's batch state, restore original batch state.
1999 if (!already_in_batch_mode_) { 1999 if (!already_in_batch_mode_) {
2000 DVLOG(1) << "Leaving Batch Mode."; 2000 DVLOG(1) << "Leaving Batch Mode.";
2001 connection_->packet_generator_.FinishBatchOperations(); 2001 connection_->packet_generator_.FinishBatchOperations();
2002 } 2002 }
2003 DCHECK_EQ(already_in_batch_mode_, 2003 DCHECK_EQ(already_in_batch_mode_,
2004 connection_->packet_generator_.InBatchMode()); 2004 connection_->packet_generator_.InBatchMode());
2005 } 2005 }
2006 2006
2007 } // namespace net 2007 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_connection.h ('k') | net/quic/quic_sent_packet_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698