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

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

Issue 734063004: Update from https://crrev.com/304418 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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_test.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
deleted file mode 100644
index eb4cdb0c636da02dec53a9ef5f907b5aee16e087..0000000000000000000000000000000000000000
--- a/net/quic/congestion_control/leaky_bucket.h
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-//
-// Helper class to track the rate data can leave the buffer for pacing.
-// A leaky bucket drains the data at a constant rate regardless of fullness of
-// the buffer.
-// See http://en.wikipedia.org/wiki/Leaky_bucket for more details.
-
-#ifndef NET_QUIC_CONGESTION_CONTROL_LEAKY_BUCKET_H_
-#define NET_QUIC_CONGESTION_CONTROL_LEAKY_BUCKET_H_
-
-#include "base/basictypes.h"
-#include "net/base/net_export.h"
-#include "net/quic/quic_bandwidth.h"
-#include "net/quic/quic_protocol.h"
-#include "net/quic/quic_time.h"
-
-namespace net {
-
-class NET_EXPORT_PRIVATE LeakyBucket {
- public:
- explicit LeakyBucket(QuicBandwidth draining_rate);
-
- // Set the rate at which the bytes leave the buffer.
- void SetDrainingRate(QuicTime now, QuicBandwidth draining_rate);
-
- // Add data to the buffer.
- void Add(QuicTime now, QuicByteCount bytes);
-
- // Time until the buffer is empty.
- QuicTime::Delta TimeRemaining(QuicTime now) const;
-
- // Number of bytes in the buffer.
- QuicByteCount BytesPending(QuicTime now);
-
- private:
- void Update(QuicTime now);
-
- QuicByteCount bytes_;
- QuicTime time_last_updated_;
- QuicBandwidth draining_rate_;
-
- DISALLOW_COPY_AND_ASSIGN(LeakyBucket);
-};
-
-} // namespace net
-
-#endif // NET_QUIC_CONGESTION_CONTROL_LEAKY_BUCKET_H_
« no previous file with comments | « net/quic/congestion_control/hybrid_slow_start_test.cc ('k') | net/quic/congestion_control/leaky_bucket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698