| 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/tools/quic/quic_server_session.h" | 5 #include "net/tools/quic/quic_server_session.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "net/quic/crypto/source_address_token.h" | 8 #include "net/quic/crypto/source_address_token.h" |
| 9 #include "net/quic/quic_connection.h" | 9 #include "net/quic/quic_connection.h" |
| 10 #include "net/quic/quic_flags.h" | 10 #include "net/quic/quic_flags.h" |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 | 116 |
| 117 // Fill the proto before passing it to the crypto stream to send. | 117 // Fill the proto before passing it to the crypto stream to send. |
| 118 CachedNetworkParameters cached_network_params; | 118 CachedNetworkParameters cached_network_params; |
| 119 cached_network_params.set_bandwidth_estimate_bytes_per_second( | 119 cached_network_params.set_bandwidth_estimate_bytes_per_second( |
| 120 bandwidth_estimate_sent_to_client_.ToBytesPerSecond()); | 120 bandwidth_estimate_sent_to_client_.ToBytesPerSecond()); |
| 121 cached_network_params.set_max_bandwidth_estimate_bytes_per_second( | 121 cached_network_params.set_max_bandwidth_estimate_bytes_per_second( |
| 122 max_bandwidth_estimate.ToBytesPerSecond()); | 122 max_bandwidth_estimate.ToBytesPerSecond()); |
| 123 cached_network_params.set_max_bandwidth_timestamp_seconds( | 123 cached_network_params.set_max_bandwidth_timestamp_seconds( |
| 124 max_bandwidth_timestamp); | 124 max_bandwidth_timestamp); |
| 125 cached_network_params.set_min_rtt_ms( | 125 cached_network_params.set_min_rtt_ms( |
| 126 sent_packet_manager.GetRttStats()->min_rtt().ToMilliseconds()); | 126 sent_packet_manager.GetRttStats()->MinRtt().ToMilliseconds()); |
| 127 cached_network_params.set_previous_connection_state( | 127 cached_network_params.set_previous_connection_state( |
| 128 bandwidth_recorder.EstimateRecordedDuringSlowStart() | 128 bandwidth_recorder.EstimateRecordedDuringSlowStart() |
| 129 ? CachedNetworkParameters::SLOW_START | 129 ? CachedNetworkParameters::SLOW_START |
| 130 : CachedNetworkParameters::CONGESTION_AVOIDANCE); | 130 : CachedNetworkParameters::CONGESTION_AVOIDANCE); |
| 131 cached_network_params.set_timestamp( | 131 cached_network_params.set_timestamp( |
| 132 connection()->clock()->WallNow().ToUNIXSeconds()); | 132 connection()->clock()->WallNow().ToUNIXSeconds()); |
| 133 if (!serving_region_.empty()) { | 133 if (!serving_region_.empty()) { |
| 134 cached_network_params.set_serving_region(serving_region_); | 134 cached_network_params.set_serving_region(serving_region_); |
| 135 } | 135 } |
| 136 | 136 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 167 DLOG(ERROR) << "Server push not yet supported"; | 167 DLOG(ERROR) << "Server push not yet supported"; |
| 168 return nullptr; | 168 return nullptr; |
| 169 } | 169 } |
| 170 | 170 |
| 171 QuicCryptoServerStream* QuicServerSession::GetCryptoStream() { | 171 QuicCryptoServerStream* QuicServerSession::GetCryptoStream() { |
| 172 return crypto_stream_.get(); | 172 return crypto_stream_.get(); |
| 173 } | 173 } |
| 174 | 174 |
| 175 } // namespace tools | 175 } // namespace tools |
| 176 } // namespace net | 176 } // namespace net |
| OLD | NEW |