| OLD | NEW |
| 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/core/quic_bandwidth.h" | 5 #include "net/quic/core/quic_bandwidth.h" |
| 6 | 6 |
| 7 #include <cinttypes> | 7 #include <cinttypes> |
| 8 #include <limits> | 8 #include <limits> |
| 9 | 9 |
| 10 #include "base/logging.h" | |
| 11 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| 12 #include "net/quic/core/quic_constants.h" | 11 #include "net/quic/core/quic_constants.h" |
| 13 #include "net/quic/core/quic_time.h" | 12 #include "net/quic/core/quic_time.h" |
| 14 #include "net/quic/core/quic_types.h" | 13 #include "net/quic/core/quic_types.h" |
| 15 #include "net/quic/platform/api/quic_bug_tracker.h" | 14 #include "net/quic/platform/api/quic_bug_tracker.h" |
| 16 | 15 |
| 17 using base::StringPrintf; | 16 using base::StringPrintf; |
| 18 | 17 |
| 19 namespace net { | 18 namespace net { |
| 20 | 19 |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 } | 132 } |
| 134 | 133 |
| 135 double bits_per_second_with_unit = bits_per_second_ / divisor; | 134 double bits_per_second_with_unit = bits_per_second_ / divisor; |
| 136 double bytes_per_second_with_unit = bits_per_second_with_unit / 8; | 135 double bytes_per_second_with_unit = bits_per_second_with_unit / 8; |
| 137 return StringPrintf("%.2f %cbits/s (%.2f %cbytes/s)", | 136 return StringPrintf("%.2f %cbits/s (%.2f %cbytes/s)", |
| 138 bits_per_second_with_unit, unit, | 137 bits_per_second_with_unit, unit, |
| 139 bytes_per_second_with_unit, unit); | 138 bytes_per_second_with_unit, unit); |
| 140 } | 139 } |
| 141 | 140 |
| 142 } // namespace net | 141 } // namespace net |
| OLD | NEW |