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

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

Issue 14651009: Land Recent QUIC changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix integer constant is too large for 'unsigned long' type Created 7 years, 7 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/crypto/proof_test.cc ('k') | net/quic/quic_crypto_client_stream.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 #include "net/quic/quic_bandwidth.h" 5 #include "net/quic/quic_bandwidth.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/time.h" 8 #include "base/time.h"
9 9
10 namespace net { 10 namespace net {
11 11
12 // Highest number that QuicBandwidth can hold. 12 // Highest number that QuicBandwidth can hold.
13 const int64 kQuicInfiniteBandwidth = 0x7fffffffffffffffll; 13 const int64 kQuicInfiniteBandwidth = GG_INT64_C(0x7fffffffffffffff);
14 14
15 // static 15 // static
16 QuicBandwidth QuicBandwidth::Zero() { 16 QuicBandwidth QuicBandwidth::Zero() {
17 return QuicBandwidth(0); 17 return QuicBandwidth(0);
18 } 18 }
19 19
20 // static 20 // static
21 QuicBandwidth QuicBandwidth::FromBitsPerSecond(int64 bits_per_second) { 21 QuicBandwidth QuicBandwidth::FromBitsPerSecond(int64 bits_per_second) {
22 return QuicBandwidth(bits_per_second); 22 return QuicBandwidth(bits_per_second);
23 } 23 }
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 QuicBandwidth QuicBandwidth::Subtract(const QuicBandwidth& delta) const { 94 QuicBandwidth QuicBandwidth::Subtract(const QuicBandwidth& delta) const {
95 return QuicBandwidth(bits_per_second_ - delta.bits_per_second_); 95 return QuicBandwidth(bits_per_second_ - delta.bits_per_second_);
96 } 96 }
97 97
98 QuicBandwidth QuicBandwidth::Scale(float scale_factor) const { 98 QuicBandwidth QuicBandwidth::Scale(float scale_factor) const {
99 return QuicBandwidth(bits_per_second_ * scale_factor); 99 return QuicBandwidth(bits_per_second_ * scale_factor);
100 } 100 }
101 101
102 } // namespace net 102 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/crypto/proof_test.cc ('k') | net/quic/quic_crypto_client_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698