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

Side by Side Diff: net/quic/congestion_control/quic_congestion_manager.cc

Issue 16256017: Land Recent QUIC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix for Android DEBUG builds with DEATH_TEST Created 7 years, 6 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
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/congestion_control/quic_congestion_manager.h" 5 #include "net/quic/congestion_control/quic_congestion_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 9
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 new class SendAlgorithmInterface::SentPacket(bytes, sent_time); 55 new class SendAlgorithmInterface::SentPacket(bytes, sent_time);
56 pending_packets_[sequence_number] = bytes; 56 pending_packets_[sequence_number] = bytes;
57 CleanupPacketHistory(); 57 CleanupPacketHistory();
58 } 58 }
59 59
60 // Called when a packet is timed out. 60 // Called when a packet is timed out.
61 void QuicCongestionManager::AbandoningPacket( 61 void QuicCongestionManager::AbandoningPacket(
62 QuicPacketSequenceNumber sequence_number) { 62 QuicPacketSequenceNumber sequence_number) {
63 PendingPacketsMap::iterator it = pending_packets_.find(sequence_number); 63 PendingPacketsMap::iterator it = pending_packets_.find(sequence_number);
64 if (it != pending_packets_.end()) { 64 if (it != pending_packets_.end()) {
65 // Shouldn't this report loss as well? (decrease cgst window).
65 send_algorithm_->AbandoningPacket(sequence_number, it->second); 66 send_algorithm_->AbandoningPacket(sequence_number, it->second);
66 pending_packets_.erase(it); 67 pending_packets_.erase(it);
67 } 68 }
68 } 69 }
69 70
70 void QuicCongestionManager::OnIncomingQuicCongestionFeedbackFrame( 71 void QuicCongestionManager::OnIncomingQuicCongestionFeedbackFrame(
71 const QuicCongestionFeedbackFrame& frame, QuicTime feedback_receive_time) { 72 const QuicCongestionFeedbackFrame& frame, QuicTime feedback_receive_time) {
72 send_algorithm_->OnIncomingQuicCongestionFeedbackFrame( 73 send_algorithm_->OnIncomingQuicCongestionFeedbackFrame(
73 frame, feedback_receive_time, packet_history_map_); 74 frame, feedback_receive_time, packet_history_map_);
74 } 75 }
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 if (now.Subtract(history_it->second->SendTimestamp()) <= kHistoryPeriod) { 185 if (now.Subtract(history_it->second->SendTimestamp()) <= kHistoryPeriod) {
185 return; 186 return;
186 } 187 }
187 delete history_it->second; 188 delete history_it->second;
188 packet_history_map_.erase(history_it); 189 packet_history_map_.erase(history_it);
189 history_it = packet_history_map_.begin(); 190 history_it = packet_history_map_.begin();
190 } 191 }
191 } 192 }
192 193
193 } // namespace net 194 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/crypto/crypto_server_config.h » ('j') | net/quic/quic_http_stream_test.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698