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

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

Issue 183683025: CL generated with data from dead-code analysis using Scythe (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/congestion_control/inter_arrival_probe.h" 5 #include "net/quic/congestion_control/inter_arrival_probe.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 12 matching lines...) Expand all
23 InterArrivalProbe::InterArrivalProbe(QuicByteCount max_segment_size) 23 InterArrivalProbe::InterArrivalProbe(QuicByteCount max_segment_size)
24 : max_segment_size_(max_segment_size), 24 : max_segment_size_(max_segment_size),
25 estimate_available_(false), 25 estimate_available_(false),
26 available_channel_estimate_(QuicBandwidth::Zero()), 26 available_channel_estimate_(QuicBandwidth::Zero()),
27 unacked_data_(0) { 27 unacked_data_(0) {
28 } 28 }
29 29
30 InterArrivalProbe::~InterArrivalProbe() { 30 InterArrivalProbe::~InterArrivalProbe() {
31 } 31 }
32 32
33 void InterArrivalProbe::set_max_segment_size(QuicByteCount max_segment_size) {
34 max_segment_size_ = max_segment_size;
35 }
36
37 bool InterArrivalProbe::GetEstimate(QuicBandwidth* available_channel_estimate) { 33 bool InterArrivalProbe::GetEstimate(QuicBandwidth* available_channel_estimate) {
38 if (!estimate_available_) { 34 if (!estimate_available_) {
39 return false; 35 return false;
40 } 36 }
41 *available_channel_estimate = available_channel_estimate_; 37 *available_channel_estimate = available_channel_estimate_;
42 return true; 38 return true;
43 } 39 }
44 40
45 void InterArrivalProbe::OnPacketSent(QuicByteCount bytes) { 41 void InterArrivalProbe::OnPacketSent(QuicByteCount bytes) {
46 if (!estimate_available_) { 42 if (!estimate_available_) {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 break; 119 break;
124 } 120 }
125 estimate_available_ = true; 121 estimate_available_ = true;
126 available_channel_estimator_.reset(NULL); 122 available_channel_estimator_.reset(NULL);
127 DVLOG(1) << "Probe estimate:" 123 DVLOG(1) << "Probe estimate:"
128 << available_channel_estimate_.ToKBitsPerSecond() 124 << available_channel_estimate_.ToKBitsPerSecond()
129 << " Kbits/s"; 125 << " Kbits/s";
130 } 126 }
131 127
132 } // namespace net 128 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/congestion_control/inter_arrival_probe.h ('k') | net/quic/congestion_control/paced_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698