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

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

Issue 1435553004: Add OnConnectionMigration method to QuicSentPacketManager. Add OnConnectionMigration interface to S… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@106845785
Patch Set: Created 5 years, 1 month 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/quic_sent_packet_manager.h ('k') | net/quic/test_tools/quic_test_utils.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_sent_packet_manager.h" 5 #include "net/quic/quic_sent_packet_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after
928 928
929 // Set up a pacing sender with a 1 millisecond alarm granularity, the same as 929 // Set up a pacing sender with a 1 millisecond alarm granularity, the same as
930 // the default granularity of the Linux kernel's FQ qdisc. 930 // the default granularity of the Linux kernel's FQ qdisc.
931 using_pacing_ = true; 931 using_pacing_ = true;
932 send_algorithm_.reset( 932 send_algorithm_.reset(
933 new PacingSender(send_algorithm_.release(), 933 new PacingSender(send_algorithm_.release(),
934 QuicTime::Delta::FromMilliseconds(1), 934 QuicTime::Delta::FromMilliseconds(1),
935 kInitialUnpacedBurst)); 935 kInitialUnpacedBurst));
936 } 936 }
937 937
938 void QuicSentPacketManager::OnConnectionMigration(PeerAddressChangeType type) {
939 if (type == UNKNOWN) {
940 return;
941 }
942
943 if (type == NAT_PORT_REBINDING || type == IPV4_SUBNET_REBINDING) {
944 // Rtt and cwnd do not need to be reset when the peer address change is
945 // considered to be caused by NATs.
946 return;
947 }
948
949 rtt_stats_.OnConnectionMigration();
950 send_algorithm_->OnConnectionMigration();
951 }
952
938 } // namespace net 953 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_sent_packet_manager.h ('k') | net/quic/test_tools/quic_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698