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 <set> | 7 #include <set> |
8 | 8 |
9 #include "base/cpu.h" | 9 #include "base/cpu.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
815 | 815 |
816 QuicConnection* connection = | 816 QuicConnection* connection = |
817 new QuicConnection(connection_id, addr, helper_.get(), writer.get(), | 817 new QuicConnection(connection_id, addr, helper_.get(), writer.get(), |
818 false, supported_versions_); | 818 false, supported_versions_); |
819 writer->SetConnection(connection); | 819 writer->SetConnection(connection); |
820 connection->set_max_packet_length(max_packet_length_); | 820 connection->set_max_packet_length(max_packet_length_); |
821 | 821 |
822 InitializeCachedStateInCryptoConfig(server_id, server_info); | 822 InitializeCachedStateInCryptoConfig(server_id, server_info); |
823 | 823 |
824 QuicConfig config = config_; | 824 QuicConfig config = config_; |
825 config_.SetInitialCongestionWindowToSend( | 825 config.SetInitialCongestionWindowToSend( |
826 server_id.is_https() ? kServerSecureInitialCongestionWindow | 826 server_id.is_https() ? kServerSecureInitialCongestionWindow |
827 : kServerInecureInitialCongestionWindow); | 827 : kServerInecureInitialCongestionWindow); |
828 if (http_server_properties_) { | 828 if (http_server_properties_) { |
829 const HttpServerProperties::NetworkStats* stats = | 829 const HttpServerProperties::NetworkStats* stats = |
830 http_server_properties_->GetServerNetworkStats( | 830 http_server_properties_->GetServerNetworkStats( |
831 server_id.host_port_pair()); | 831 server_id.host_port_pair()); |
832 if (stats != NULL) { | 832 if (stats != NULL) { |
833 config.SetInitialRoundTripTimeUsToSend(stats->srtt.InMicroseconds()); | 833 config.SetInitialRoundTripTimeUsToSend(stats->srtt.InMicroseconds()); |
834 } | 834 } |
835 } | 835 } |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
934 http_server_properties_->ClearAlternateProtocol(server); | 934 http_server_properties_->ClearAlternateProtocol(server); |
935 http_server_properties_->SetAlternateProtocol( | 935 http_server_properties_->SetAlternateProtocol( |
936 server, alternate.port, alternate.protocol); | 936 server, alternate.port, alternate.protocol); |
937 DCHECK_EQ(QUIC, | 937 DCHECK_EQ(QUIC, |
938 http_server_properties_->GetAlternateProtocol(server).protocol); | 938 http_server_properties_->GetAlternateProtocol(server).protocol); |
939 DCHECK(http_server_properties_->WasAlternateProtocolRecentlyBroken( | 939 DCHECK(http_server_properties_->WasAlternateProtocolRecentlyBroken( |
940 server)); | 940 server)); |
941 } | 941 } |
942 | 942 |
943 } // namespace net | 943 } // namespace net |
OLD | NEW |