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_server_session_base.h" | 5 #include "net/quic/core/quic_server_session_base.h" |
6 | 6 |
7 #include "net/quic/core/proto/cached_network_parameters.pb.h" | 7 #include "net/quic/core/proto/cached_network_parameters.pb.h" |
8 #include "net/quic/core/quic_connection.h" | 8 #include "net/quic/core/quic_connection.h" |
9 #include "net/quic/core/quic_flags.h" | 9 #include "net/quic/core/quic_flags.h" |
10 #include "net/quic/core/quic_stream.h" | 10 #include "net/quic/core/quic_stream.h" |
11 #include "net/quic/platform/api/quic_bug_tracker.h" | 11 #include "net/quic/platform/api/quic_bug_tracker.h" |
12 #include "net/quic/platform/api/quic_logging.h" | 12 #include "net/quic/platform/api/quic_logging.h" |
| 13 #include "net/quic/platform/api/quic_string_piece.h" |
13 | 14 |
14 using std::string; | 15 using std::string; |
15 | 16 |
16 namespace net { | 17 namespace net { |
17 | 18 |
18 QuicServerSessionBase::QuicServerSessionBase( | 19 QuicServerSessionBase::QuicServerSessionBase( |
19 const QuicConfig& config, | 20 const QuicConfig& config, |
20 QuicConnection* connection, | 21 QuicConnection* connection, |
21 Visitor* visitor, | 22 Visitor* visitor, |
22 QuicCryptoServerStream::Helper* helper, | 23 QuicCryptoServerStream::Helper* helper, |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 | 233 |
233 int32_t QuicServerSessionBase::BandwidthToCachedParameterBytesPerSecond( | 234 int32_t QuicServerSessionBase::BandwidthToCachedParameterBytesPerSecond( |
234 const QuicBandwidth& bandwidth) { | 235 const QuicBandwidth& bandwidth) { |
235 int64_t bytes_per_second = bandwidth.ToBytesPerSecond(); | 236 int64_t bytes_per_second = bandwidth.ToBytesPerSecond(); |
236 return (bytes_per_second > static_cast<int64_t>(INT32_MAX) | 237 return (bytes_per_second > static_cast<int64_t>(INT32_MAX) |
237 ? INT32_MAX | 238 ? INT32_MAX |
238 : static_cast<int32_t>(bytes_per_second)); | 239 : static_cast<int32_t>(bytes_per_second)); |
239 } | 240 } |
240 | 241 |
241 } // namespace net | 242 } // namespace net |
OLD | NEW |