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

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

Issue 1160203003: net: Remove the remaining use of GG_(U)INTn_C macros. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: stdint.h Created 5 years, 6 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
« no previous file with comments | « net/quic/crypto/null_decrypter.cc ('k') | net/quic/quic_data_writer.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 <stdint.h>
8
7 #include "base/logging.h" 9 #include "base/logging.h"
8 #include "net/quic/quic_time.h" 10 #include "net/quic/quic_time.h"
9 #include "net/quic/quic_types.h" 11 #include "net/quic/quic_types.h"
10 12
11 namespace net { 13 namespace net {
12 14
13 // Highest number that QuicBandwidth can hold. 15 // Highest number that QuicBandwidth can hold.
14 const int64 kQuicInfiniteBandwidth = GG_INT64_C(0x7fffffffffffffff); 16 const int64 kQuicInfiniteBandwidth = INT64_C(0x7fffffffffffffff);
15 17
16 // static 18 // static
17 QuicBandwidth QuicBandwidth::Zero() { 19 QuicBandwidth QuicBandwidth::Zero() {
18 return QuicBandwidth(0); 20 return QuicBandwidth(0);
19 } 21 }
20 22
21 // static 23 // static
22 QuicBandwidth QuicBandwidth::FromBitsPerSecond(int64 bits_per_second) { 24 QuicBandwidth QuicBandwidth::FromBitsPerSecond(int64 bits_per_second) {
23 return QuicBandwidth(bits_per_second); 25 return QuicBandwidth(bits_per_second);
24 } 26 }
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 103
102 QuicTime::Delta QuicBandwidth::TransferTime(QuicByteCount bytes) const { 104 QuicTime::Delta QuicBandwidth::TransferTime(QuicByteCount bytes) const {
103 if (bits_per_second_ == 0) { 105 if (bits_per_second_ == 0) {
104 return QuicTime::Delta::Zero(); 106 return QuicTime::Delta::Zero();
105 } 107 }
106 return QuicTime::Delta::FromMicroseconds(bytes * 8 * kNumMicrosPerSecond / 108 return QuicTime::Delta::FromMicroseconds(bytes * 8 * kNumMicrosPerSecond /
107 bits_per_second_); 109 bits_per_second_);
108 } 110 }
109 111
110 } // namespace net 112 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/crypto/null_decrypter.cc ('k') | net/quic/quic_data_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698