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

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

Issue 683113005: Update from chromium https://crrev.com/302282 (Closed) Base URL: git@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 unified diff | Download patch
« no previous file with comments | « net/quic/crypto/quic_crypto_server_config_test.cc ('k') | net/quic/quic_bandwidth.cc » ('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 typedef uint64 QuicPacketCount;
16 17
17 class NET_EXPORT_PRIVATE QuicBandwidth { 18 class NET_EXPORT_PRIVATE QuicBandwidth {
18 public: 19 public:
19 // Creates a new QuicBandwidth with an internal value of 0. 20 // Creates a new QuicBandwidth with an internal value of 0.
20 static QuicBandwidth Zero(); 21 static QuicBandwidth Zero();
21 22
22 // Create a new QuicBandwidth holding the bits per second. 23 // Create a new QuicBandwidth holding the bits per second.
23 static QuicBandwidth FromBitsPerSecond(int64 bits_per_second); 24 static QuicBandwidth FromBitsPerSecond(int64 bits_per_second);
24 25
25 // Create a new QuicBandwidth holding the kilo bits per second. 26 // Create a new QuicBandwidth holding the kilo bits per second.
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 } 78 }
78 inline bool operator<=(QuicBandwidth lhs, QuicBandwidth rhs) { 79 inline bool operator<=(QuicBandwidth lhs, QuicBandwidth rhs) {
79 return !(rhs < lhs); 80 return !(rhs < lhs);
80 } 81 }
81 inline bool operator>=(QuicBandwidth lhs, QuicBandwidth rhs) { 82 inline bool operator>=(QuicBandwidth lhs, QuicBandwidth rhs) {
82 return !(lhs < rhs); 83 return !(lhs < rhs);
83 } 84 }
84 85
85 } // namespace net 86 } // namespace net
86 #endif // NET_QUIC_QUIC_BANDWIDTH_H_ 87 #endif // NET_QUIC_QUIC_BANDWIDTH_H_
OLDNEW
« no previous file with comments | « net/quic/crypto/quic_crypto_server_config_test.cc ('k') | net/quic/quic_bandwidth.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698