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

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

Issue 14816006: Land Recent QUIC changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added missing NET_PRIVATE_EXPORT to QuicWallTime Created 7 years, 7 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/net.gyp ('k') | net/quic/congestion_control/fix_rate_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/congestion_control/fix_rate_sender.h" 5 #include "net/quic/congestion_control/fix_rate_sender.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "net/quic/quic_protocol.h" 10 #include "net/quic/quic_protocol.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 void FixRateSender::OnIncomingLoss(QuicTime /*ack_receive_time*/) { 54 void FixRateSender::OnIncomingLoss(QuicTime /*ack_receive_time*/) {
55 // Ignore losses for fix rate sender. 55 // Ignore losses for fix rate sender.
56 } 56 }
57 57
58 void FixRateSender::SentPacket(QuicTime sent_time, 58 void FixRateSender::SentPacket(QuicTime sent_time,
59 QuicPacketSequenceNumber /*sequence_number*/, 59 QuicPacketSequenceNumber /*sequence_number*/,
60 QuicByteCount bytes, 60 QuicByteCount bytes,
61 Retransmission is_retransmission) { 61 Retransmission is_retransmission) {
62 fix_rate_leaky_bucket_.Add(sent_time, bytes); 62 fix_rate_leaky_bucket_.Add(sent_time, bytes);
63 paced_sender_.SentPacket(sent_time, bytes); 63 paced_sender_.SentPacket(sent_time, bytes);
64 if (!is_retransmission) { 64 if (is_retransmission == NOT_RETRANSMISSION) {
65 data_in_flight_ += bytes; 65 data_in_flight_ += bytes;
66 } 66 }
67 } 67 }
68 68
69 void FixRateSender::AbandoningPacket( 69 void FixRateSender::AbandoningPacket(
70 QuicPacketSequenceNumber /*sequence_number*/, 70 QuicPacketSequenceNumber /*sequence_number*/,
71 QuicByteCount /*abandoned_bytes*/) { 71 QuicByteCount /*abandoned_bytes*/) {
72 } 72 }
73 73
74 QuicTime::Delta FixRateSender::TimeUntilSend( 74 QuicTime::Delta FixRateSender::TimeUntilSend(
(...skipping 25 matching lines...) Expand all
100 QuicBandwidth FixRateSender::BandwidthEstimate() { 100 QuicBandwidth FixRateSender::BandwidthEstimate() {
101 return bitrate_; 101 return bitrate_;
102 } 102 }
103 103
104 QuicTime::Delta FixRateSender::SmoothedRtt() { 104 QuicTime::Delta FixRateSender::SmoothedRtt() {
105 // TODO(satyamshekhar): Calculate and return smoothed rtt. 105 // TODO(satyamshekhar): Calculate and return smoothed rtt.
106 return latest_rtt_; 106 return latest_rtt_;
107 } 107 }
108 108
109 } // namespace net 109 } // namespace net
OLDNEW
« no previous file with comments | « net/net.gyp ('k') | net/quic/congestion_control/fix_rate_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698