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

Unified Diff: net/quic/quic_connection.cc

Issue 876313009: Keep an instance of QuicAckFrame in QuicConnection in order to reduce (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Fix_compile_errors_85182632
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_connection.h ('k') | net/quic/quic_connection_test.cc » ('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 ce3b0010aa578b46dcbce3bcb5af68ff0e559bb9..244fd9c3d35c798d17a51e8387d9231c7cbafe47 100644
--- a/net/quic/quic_connection.cc
+++ b/net/quic/quic_connection.cc
@@ -969,18 +969,16 @@ void QuicConnection::MaybeCloseIfTooManyOutstandingPackets() {
}
}
-QuicAckFrame* QuicConnection::CreateAckFrame() {
- QuicAckFrame* outgoing_ack = new QuicAckFrame();
- received_packet_manager_.UpdateReceivedPacketInfo(
- outgoing_ack, clock_->ApproximateNow());
- DVLOG(1) << ENDPOINT << "Creating ack frame: " << *outgoing_ack;
- return outgoing_ack;
+void QuicConnection::PopulateAckFrame(QuicAckFrame* ack) {
+ received_packet_manager_.UpdateReceivedPacketInfo(ack,
+ clock_->ApproximateNow());
}
-QuicStopWaitingFrame* QuicConnection::CreateStopWaitingFrame() {
- QuicStopWaitingFrame stop_waiting;
- UpdateStopWaiting(&stop_waiting);
- return new QuicStopWaitingFrame(stop_waiting);
+void QuicConnection::PopulateStopWaitingFrame(
+ QuicStopWaitingFrame* stop_waiting) {
+ stop_waiting->least_unacked = GetLeastUnacked();
+ stop_waiting->entropy_hash = sent_entropy_manager_.GetCumulativeEntropy(
+ stop_waiting->least_unacked - 1);
}
bool QuicConnection::ShouldLastPacketInstigateAck() const {
@@ -1652,12 +1650,6 @@ void QuicConnection::SendOrQueuePacket(QueuedPacket packet) {
}
}
-void QuicConnection::UpdateStopWaiting(QuicStopWaitingFrame* stop_waiting) {
- stop_waiting->least_unacked = GetLeastUnacked();
- stop_waiting->entropy_hash = sent_entropy_manager_.GetCumulativeEntropy(
- stop_waiting->least_unacked - 1);
-}
-
void QuicConnection::SendPing() {
if (retransmission_alarm_->IsSet()) {
return;
« no previous file with comments | « net/quic/quic_connection.h ('k') | net/quic/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698