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

Unified Diff: net/quic/quic_sustained_bandwidth_recorder.h

Issue 490263003: When talking >=QUIC_VERSION_22, regularly send updated bandwidth (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: net/quic/quic_sustained_bandwidth_recorder.h
diff --git a/net/quic/quic_sustained_bandwidth_recorder.h b/net/quic/quic_sustained_bandwidth_recorder.h
index 0794a0719a8f5c3bb1c3eff3f373e86f70221979..aa5a4c916f510ea5fcf92e656ae2cee3c8414a11 100644
--- a/net/quic/quic_sustained_bandwidth_recorder.h
+++ b/net/quic/quic_sustained_bandwidth_recorder.h
@@ -11,6 +11,10 @@
namespace net {
+namespace test {
+class QuicSustainedBandwidthRecorderPeer;
+} // namespace test
+
// This class keeps track of a sustained bandwidth estimate to ultimately send
// to the client in a server config update message. A sustained bandwidth
// estimate is only marked as valid if the QuicSustainedBandwidthRecorder has
@@ -19,11 +23,11 @@ class NET_EXPORT_PRIVATE QuicSustainedBandwidthRecorder {
public:
QuicSustainedBandwidthRecorder();
- // As long as |is_reliable_estimate| is consistently true, multiple calls to
- // this method over a 3 * srtt period results in storage of a valid sustained
+ // As long as |in_recovery| is consistently false, multiple calls to this
+ // method over a 3 * srtt period results in storage of a valid sustained
// bandwidth estimate.
// |time_now| is used as a max bandwidth timestamp if needed.
- void RecordEstimate(bool is_reliable_estimate,
+ void RecordEstimate(bool in_recovery,
bool in_slow_start,
QuicBandwidth bandwidth,
QuicTime estimate_time,
@@ -55,6 +59,8 @@ class NET_EXPORT_PRIVATE QuicSustainedBandwidthRecorder {
}
private:
+ friend class test::QuicSustainedBandwidthRecorderPeer;
+
// True if we have been able to calculate sustained bandwidth, over at least
// one recording period (3 * rtt).
bool has_estimate_;

Powered by Google App Engine
This is Rietveld 408576698