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

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

Issue 391383002: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merging with TOT Created 6 years, 5 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_client_session_test.cc ('k') | net/quic/quic_connection_stats.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 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after
1062 1062
1063 const QuicConnectionStats& QuicConnection::GetStats() { 1063 const QuicConnectionStats& QuicConnection::GetStats() {
1064 // Update rtt and estimated bandwidth. 1064 // Update rtt and estimated bandwidth.
1065 stats_.min_rtt_us = 1065 stats_.min_rtt_us =
1066 sent_packet_manager_.GetRttStats()->min_rtt().ToMicroseconds(); 1066 sent_packet_manager_.GetRttStats()->min_rtt().ToMicroseconds();
1067 stats_.srtt_us = 1067 stats_.srtt_us =
1068 sent_packet_manager_.GetRttStats()->SmoothedRtt().ToMicroseconds(); 1068 sent_packet_manager_.GetRttStats()->SmoothedRtt().ToMicroseconds();
1069 stats_.estimated_bandwidth = 1069 stats_.estimated_bandwidth =
1070 sent_packet_manager_.BandwidthEstimate().ToBytesPerSecond(); 1070 sent_packet_manager_.BandwidthEstimate().ToBytesPerSecond();
1071 stats_.congestion_window = sent_packet_manager_.GetCongestionWindow(); 1071 stats_.congestion_window = sent_packet_manager_.GetCongestionWindow();
1072 stats_.slow_start_threshold = sent_packet_manager_.GetSlowStartThreshold();
1072 stats_.max_packet_size = packet_generator_.max_packet_length(); 1073 stats_.max_packet_size = packet_generator_.max_packet_length();
1073 return stats_; 1074 return stats_;
1074 } 1075 }
1075 1076
1076 void QuicConnection::ProcessUdpPacket(const IPEndPoint& self_address, 1077 void QuicConnection::ProcessUdpPacket(const IPEndPoint& self_address,
1077 const IPEndPoint& peer_address, 1078 const IPEndPoint& peer_address,
1078 const QuicEncryptedPacket& packet) { 1079 const QuicEncryptedPacket& packet) {
1079 if (!connected_) { 1080 if (!connected_) {
1080 return; 1081 return;
1081 } 1082 }
(...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after
1977 // If we changed the generator's batch state, restore original batch state. 1978 // If we changed the generator's batch state, restore original batch state.
1978 if (!already_in_batch_mode_) { 1979 if (!already_in_batch_mode_) {
1979 DVLOG(1) << "Leaving Batch Mode."; 1980 DVLOG(1) << "Leaving Batch Mode.";
1980 connection_->packet_generator_.FinishBatchOperations(); 1981 connection_->packet_generator_.FinishBatchOperations();
1981 } 1982 }
1982 DCHECK_EQ(already_in_batch_mode_, 1983 DCHECK_EQ(already_in_batch_mode_,
1983 connection_->packet_generator_.InBatchMode()); 1984 connection_->packet_generator_.InBatchMode());
1984 } 1985 }
1985 1986
1986 } // namespace net 1987 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_client_session_test.cc ('k') | net/quic/quic_connection_stats.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698