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/quic_stream_factory.h" | 5 #include "net/quic/quic_stream_factory.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 1222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1233 if (!helper_.get()) { | 1233 if (!helper_.get()) { |
1234 helper_.reset( | 1234 helper_.reset( |
1235 new QuicConnectionHelper(base::ThreadTaskRunnerHandle::Get().get(), | 1235 new QuicConnectionHelper(base::ThreadTaskRunnerHandle::Get().get(), |
1236 clock_.get(), random_generator_)); | 1236 clock_.get(), random_generator_)); |
1237 } | 1237 } |
1238 | 1238 |
1239 QuicConnection* connection = new QuicConnection( | 1239 QuicConnection* connection = new QuicConnection( |
1240 connection_id, addr, helper_.get(), packet_writer_factory, | 1240 connection_id, addr, helper_.get(), packet_writer_factory, |
1241 true /* owns_writer */, Perspective::IS_CLIENT, server_id.is_https(), | 1241 true /* owns_writer */, Perspective::IS_CLIENT, server_id.is_https(), |
1242 supported_versions_); | 1242 supported_versions_); |
1243 connection->set_max_packet_length(max_packet_length_); | 1243 connection->SetMaxPacketLength(max_packet_length_); |
1244 | 1244 |
1245 InitializeCachedStateInCryptoConfig(server_id, server_info); | 1245 InitializeCachedStateInCryptoConfig(server_id, server_info); |
1246 | 1246 |
1247 QuicConfig config = config_; | 1247 QuicConfig config = config_; |
1248 config.SetSocketReceiveBufferToSend(socket_receive_buffer_size_); | 1248 config.SetSocketReceiveBufferToSend(socket_receive_buffer_size_); |
1249 config.set_max_undecryptable_packets(kMaxUndecryptablePackets); | 1249 config.set_max_undecryptable_packets(kMaxUndecryptablePackets); |
1250 config.SetInitialSessionFlowControlWindowToSend( | 1250 config.SetInitialSessionFlowControlWindowToSend( |
1251 kQuicSessionMaxRecvWindowSize); | 1251 kQuicSessionMaxRecvWindowSize); |
1252 config.SetInitialStreamFlowControlWindowToSend(kQuicStreamMaxRecvWindowSize); | 1252 config.SetInitialStreamFlowControlWindowToSend(kQuicStreamMaxRecvWindowSize); |
1253 int64 srtt = GetServerNetworkStatsSmoothedRttInMicroseconds(server_id); | 1253 int64 srtt = GetServerNetworkStatsSmoothedRttInMicroseconds(server_id); |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1414 // Since the session was active, there's no longer an | 1414 // Since the session was active, there's no longer an |
1415 // HttpStreamFactoryImpl::Job running which can mark it broken, unless the TCP | 1415 // HttpStreamFactoryImpl::Job running which can mark it broken, unless the TCP |
1416 // job also fails. So to avoid not using QUIC when we otherwise could, we mark | 1416 // job also fails. So to avoid not using QUIC when we otherwise could, we mark |
1417 // it as recently broken, which means that 0-RTT will be disabled but we'll | 1417 // it as recently broken, which means that 0-RTT will be disabled but we'll |
1418 // still race. | 1418 // still race. |
1419 http_server_properties_->MarkAlternativeServiceRecentlyBroken( | 1419 http_server_properties_->MarkAlternativeServiceRecentlyBroken( |
1420 alternative_service); | 1420 alternative_service); |
1421 } | 1421 } |
1422 | 1422 |
1423 } // namespace net | 1423 } // namespace net |
OLD | NEW |