| 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 807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 818 | 818 |
| 819 if (!helper_.get()) { | 819 if (!helper_.get()) { |
| 820 helper_.reset(new QuicConnectionHelper( | 820 helper_.reset(new QuicConnectionHelper( |
| 821 base::MessageLoop::current()->message_loop_proxy().get(), | 821 base::MessageLoop::current()->message_loop_proxy().get(), |
| 822 clock_.get(), random_generator_)); | 822 clock_.get(), random_generator_)); |
| 823 } | 823 } |
| 824 | 824 |
| 825 QuicConnection* connection = | 825 QuicConnection* connection = |
| 826 new QuicConnection(connection_id, addr, helper_.get(), writer.get(), | 826 new QuicConnection(connection_id, addr, helper_.get(), writer.get(), |
| 827 false, supported_versions_); | 827 false, supported_versions_); |
| 828 writer->SetConnection(connection); | 828 writer->SetWriterToUnblock(connection); |
| 829 connection->set_max_packet_length(max_packet_length_); | 829 connection->set_max_packet_length(max_packet_length_); |
| 830 | 830 |
| 831 InitializeCachedStateInCryptoConfig(server_id, server_info); | 831 InitializeCachedStateInCryptoConfig(server_id, server_info); |
| 832 | 832 |
| 833 QuicConfig config = config_; | 833 QuicConfig config = config_; |
| 834 config.SetInitialCongestionWindowToSend( | 834 config.SetInitialCongestionWindowToSend( |
| 835 server_id.is_https() ? kServerSecureInitialCongestionWindow | 835 server_id.is_https() ? kServerSecureInitialCongestionWindow |
| 836 : kServerInecureInitialCongestionWindow); | 836 : kServerInecureInitialCongestionWindow); |
| 837 if (http_server_properties_) { | 837 if (http_server_properties_) { |
| 838 const HttpServerProperties::NetworkStats* stats = | 838 const HttpServerProperties::NetworkStats* stats = |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 943 http_server_properties_->ClearAlternateProtocol(server); | 943 http_server_properties_->ClearAlternateProtocol(server); |
| 944 http_server_properties_->SetAlternateProtocol( | 944 http_server_properties_->SetAlternateProtocol( |
| 945 server, alternate.port, alternate.protocol); | 945 server, alternate.port, alternate.protocol); |
| 946 DCHECK_EQ(QUIC, | 946 DCHECK_EQ(QUIC, |
| 947 http_server_properties_->GetAlternateProtocol(server).protocol); | 947 http_server_properties_->GetAlternateProtocol(server).protocol); |
| 948 DCHECK(http_server_properties_->WasAlternateProtocolRecentlyBroken( | 948 DCHECK(http_server_properties_->WasAlternateProtocolRecentlyBroken( |
| 949 server)); | 949 server)); |
| 950 } | 950 } |
| 951 | 951 |
| 952 } // namespace net | 952 } // namespace net |
| OLD | NEW |