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

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

Issue 2580393003: Replace QuicAckListenerInterface* with scoped_refptr<QuicAckListenerInterface>. (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « net/quic/core/quic_connection.h ('k') | net/quic/core/quic_connection_test.cc » ('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/core/quic_connection.h" 5 #include "net/quic/core/quic_connection.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 #include <sys/types.h> 8 #include <sys/types.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after
1109 } 1109 }
1110 1110
1111 pending_version_negotiation_packet_ = false; 1111 pending_version_negotiation_packet_ = false;
1112 } 1112 }
1113 1113
1114 QuicConsumedData QuicConnection::SendStreamData( 1114 QuicConsumedData QuicConnection::SendStreamData(
1115 QuicStreamId id, 1115 QuicStreamId id,
1116 QuicIOVector iov, 1116 QuicIOVector iov,
1117 QuicStreamOffset offset, 1117 QuicStreamOffset offset,
1118 bool fin, 1118 bool fin,
1119 QuicAckListenerInterface* listener) { 1119 const scoped_refptr<QuicAckListenerInterface>& listener) {
1120 if (!fin && iov.total_length == 0) { 1120 if (!fin && iov.total_length == 0) {
1121 QUIC_BUG << "Attempt to send empty stream frame"; 1121 QUIC_BUG << "Attempt to send empty stream frame";
1122 return QuicConsumedData(0, false); 1122 return QuicConsumedData(0, false);
1123 } 1123 }
1124 1124
1125 // Opportunistically bundle an ack with every outgoing packet. 1125 // Opportunistically bundle an ack with every outgoing packet.
1126 // Particularly, we want to bundle with handshake packets since we don't know 1126 // Particularly, we want to bundle with handshake packets since we don't know
1127 // which decrypter will be used on an ack packet following a handshake 1127 // which decrypter will be used on an ack packet following a handshake
1128 // packet (a handshake packet from client to server could result in a REJ or a 1128 // packet (a handshake packet from client to server could result in a REJ or a
1129 // SHLO from the server, leading to two different decrypters at the server.) 1129 // SHLO from the server, leading to two different decrypters at the server.)
(...skipping 1328 matching lines...) Expand 10 before | Expand all | Expand 10 after
2458 2458
2459 void QuicConnection::CheckIfApplicationLimited() { 2459 void QuicConnection::CheckIfApplicationLimited() {
2460 if (queued_packets_.empty() && 2460 if (queued_packets_.empty() &&
2461 !sent_packet_manager_->HasPendingRetransmissions() && 2461 !sent_packet_manager_->HasPendingRetransmissions() &&
2462 !visitor_->WillingAndAbleToWrite()) { 2462 !visitor_->WillingAndAbleToWrite()) {
2463 sent_packet_manager_->OnApplicationLimited(); 2463 sent_packet_manager_->OnApplicationLimited();
2464 } 2464 }
2465 } 2465 }
2466 2466
2467 } // namespace net 2467 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_connection.h ('k') | net/quic/core/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698