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

Unified Diff: net/quic/congestion_control/leaky_bucket.h

Issue 12334063: Land recent QUIC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more EXPECT_FALSE Created 7 years, 10 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
« no previous file with comments | « net/quic/congestion_control/hybrid_slow_start.cc ('k') | net/quic/congestion_control/leaky_bucket.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/congestion_control/leaky_bucket.h
diff --git a/net/quic/congestion_control/leaky_bucket.h b/net/quic/congestion_control/leaky_bucket.h
index be138982e9716d501504fd3a4e8836c986057c2a..63ef8102a397bf7706fc6d1f6e6ef73d2a654ab2 100644
--- a/net/quic/congestion_control/leaky_bucket.h
+++ b/net/quic/congestion_control/leaky_bucket.h
@@ -21,25 +21,23 @@ namespace net {
class NET_EXPORT_PRIVATE LeakyBucket {
public:
- // clock is not owned by this class.
- LeakyBucket(const QuicClock* clock, QuicBandwidth draining_rate);
+ explicit LeakyBucket(QuicBandwidth draining_rate);
// Set the rate at which the bytes leave the buffer.
- void SetDrainingRate(QuicBandwidth draining_rate);
+ void SetDrainingRate(QuicTime now, QuicBandwidth draining_rate);
// Add data to the buffer.
- void Add(QuicByteCount bytes);
+ void Add(QuicTime now, QuicByteCount bytes);
- // Time until the buffer is empty in us.
- QuicTime::Delta TimeRemaining();
+ // Time until the buffer is empty.
+ QuicTime::Delta TimeRemaining(QuicTime now);
// Number of bytes in the buffer.
- QuicByteCount BytesPending();
+ QuicByteCount BytesPending(QuicTime now);
private:
- void Update();
+ void Update(QuicTime now);
- const QuicClock* clock_;
QuicByteCount bytes_;
QuicTime time_last_updated_;
QuicBandwidth draining_rate_;
« no previous file with comments | « net/quic/congestion_control/hybrid_slow_start.cc ('k') | net/quic/congestion_control/leaky_bucket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698