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 811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
822 | 822 |
823 scoped_ptr<QuicDefaultPacketWriter> writer( | 823 scoped_ptr<QuicDefaultPacketWriter> writer( |
824 new QuicDefaultPacketWriter(socket.get())); | 824 new QuicDefaultPacketWriter(socket.get())); |
825 | 825 |
826 if (!helper_.get()) { | 826 if (!helper_.get()) { |
827 helper_.reset(new QuicConnectionHelper( | 827 helper_.reset(new QuicConnectionHelper( |
828 base::MessageLoop::current()->message_loop_proxy().get(), | 828 base::MessageLoop::current()->message_loop_proxy().get(), |
829 clock_.get(), random_generator_)); | 829 clock_.get(), random_generator_)); |
830 } | 830 } |
831 | 831 |
832 QuicConnection* connection = | 832 QuicConnection* connection = new QuicConnection(connection_id, |
833 new QuicConnection(connection_id, addr, helper_.get(), writer.get(), | 833 addr, |
834 false, supported_versions_); | 834 helper_.get(), |
| 835 writer.get(), |
| 836 false /* owns_writer */, |
| 837 false /* is_server */, |
| 838 supported_versions_); |
835 writer->SetConnection(connection); | 839 writer->SetConnection(connection); |
836 connection->set_max_packet_length(max_packet_length_); | 840 connection->set_max_packet_length(max_packet_length_); |
837 | 841 |
838 InitializeCachedStateInCryptoConfig(server_id, server_info); | 842 InitializeCachedStateInCryptoConfig(server_id, server_info); |
839 | 843 |
840 QuicConfig config = config_; | 844 QuicConfig config = config_; |
841 config.SetInitialCongestionWindowToSend( | 845 config.SetInitialCongestionWindowToSend( |
842 server_id.is_https() ? kServerSecureInitialCongestionWindow | 846 server_id.is_https() ? kServerSecureInitialCongestionWindow |
843 : kServerInecureInitialCongestionWindow); | 847 : kServerInecureInitialCongestionWindow); |
844 config.SetInitialFlowControlWindowToSend(kInitialReceiveWindowSize); | 848 config.SetInitialFlowControlWindowToSend(kInitialReceiveWindowSize); |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
953 http_server_properties_->ClearAlternateProtocol(server); | 957 http_server_properties_->ClearAlternateProtocol(server); |
954 http_server_properties_->SetAlternateProtocol( | 958 http_server_properties_->SetAlternateProtocol( |
955 server, alternate.port, alternate.protocol, 1); | 959 server, alternate.port, alternate.protocol, 1); |
956 DCHECK_EQ(QUIC, | 960 DCHECK_EQ(QUIC, |
957 http_server_properties_->GetAlternateProtocol(server).protocol); | 961 http_server_properties_->GetAlternateProtocol(server).protocol); |
958 DCHECK(http_server_properties_->WasAlternateProtocolRecentlyBroken( | 962 DCHECK(http_server_properties_->WasAlternateProtocolRecentlyBroken( |
959 server)); | 963 server)); |
960 } | 964 } |
961 | 965 |
962 } // namespace net | 966 } // namespace net |
OLD | NEW |