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

Side by Side Diff: net/quic/quic_bandwidth.h

Issue 125403006: Various QUIC cleanups to sync with internal code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comments Created 6 years, 11 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
« no previous file with comments | « net/quic/congestion_control/tcp_receiver.cc ('k') | net/quic/quic_connection.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // QuicBandwidth represents a bandwidth, stored in bits per second resolution. 5 // QuicBandwidth represents a bandwidth, stored in bits per second resolution.
6 6
7 #ifndef NET_QUIC_QUIC_BANDWIDTH_H_ 7 #ifndef NET_QUIC_QUIC_BANDWIDTH_H_
8 #define NET_QUIC_QUIC_BANDWIDTH_H_ 8 #define NET_QUIC_QUIC_BANDWIDTH_H_
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "net/quic/quic_time.h" 11 #include "net/quic/quic_time.h"
12 12
13 namespace net { 13 namespace net {
14 14
15 typedef uint64 QuicByteCount; 15 typedef uint64 QuicByteCount;
16 16
17 class NET_EXPORT_PRIVATE QuicBandwidth { 17 class NET_EXPORT_PRIVATE QuicBandwidth {
18
19 public: 18 public:
20 // Creates a new QuicBandwidth with an internal value of 0. 19 // Creates a new QuicBandwidth with an internal value of 0.
21 static QuicBandwidth Zero(); 20 static QuicBandwidth Zero();
22 21
23 // Create a new QuicBandwidth holding the bits per second. 22 // Create a new QuicBandwidth holding the bits per second.
24 static QuicBandwidth FromBitsPerSecond(int64 bits_per_second); 23 static QuicBandwidth FromBitsPerSecond(int64 bits_per_second);
25 24
26 // Create a new QuicBandwidth holding the kilo bits per second. 25 // Create a new QuicBandwidth holding the kilo bits per second.
27 static QuicBandwidth FromKBitsPerSecond(int64 k_bits_per_second); 26 static QuicBandwidth FromKBitsPerSecond(int64 k_bits_per_second);
28 27
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 } 77 }
79 inline bool operator<=(QuicBandwidth lhs, QuicBandwidth rhs) { 78 inline bool operator<=(QuicBandwidth lhs, QuicBandwidth rhs) {
80 return !(rhs < lhs); 79 return !(rhs < lhs);
81 } 80 }
82 inline bool operator>=(QuicBandwidth lhs, QuicBandwidth rhs) { 81 inline bool operator>=(QuicBandwidth lhs, QuicBandwidth rhs) {
83 return !(lhs < rhs); 82 return !(lhs < rhs);
84 } 83 }
85 84
86 } // namespace net 85 } // namespace net
87 #endif // NET_QUIC_QUIC_BANDWIDTH_H_ 86 #endif // NET_QUIC_QUIC_BANDWIDTH_H_
OLDNEW
« no previous file with comments | « net/quic/congestion_control/tcp_receiver.cc ('k') | net/quic/quic_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698