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

Unified Diff: net/quic/core/quic_bandwidth.h

Issue 2323963002: Implement an event-based simulator for QuicConnection (Closed)
Patch Set: Adding missing files. Created 4 years, 3 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/core/quic_bandwidth.h
diff --git a/net/quic/core/quic_bandwidth.h b/net/quic/core/quic_bandwidth.h
index 2d131d277ed826fb5e84327a0f239c1868c7de55..780c55c78085707fc57334f98254b5dfd68a33c2 100644
--- a/net/quic/core/quic_bandwidth.h
+++ b/net/quic/core/quic_bandwidth.h
@@ -105,6 +105,12 @@ inline QuicBandwidth operator*(QuicBandwidth lhs, float rhs) {
inline QuicBandwidth operator*(float lhs, QuicBandwidth rhs) {
return rhs * lhs;
}
+inline QuicByteCount operator*(QuicBandwidth lhs, QuicTime::Delta rhs) {
+ return lhs.ToBytesPerPeriod(rhs);
+}
+inline QuicByteCount operator*(QuicTime::Delta lhs, QuicBandwidth rhs) {
+ return rhs * lhs;
+}
// Override stream output operator for gtest.
inline std::ostream& operator<<(std::ostream& output,

Powered by Google App Engine
This is Rietveld 408576698