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 836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
847 if (http_server_properties_) { | 847 if (http_server_properties_) { |
848 const HttpServerProperties::NetworkStats* stats = | 848 const HttpServerProperties::NetworkStats* stats = |
849 http_server_properties_->GetServerNetworkStats( | 849 http_server_properties_->GetServerNetworkStats( |
850 server_id.host_port_pair()); | 850 server_id.host_port_pair()); |
851 if (stats != NULL) { | 851 if (stats != NULL) { |
852 config.SetInitialRoundTripTimeUsToSend(stats->srtt.InMicroseconds()); | 852 config.SetInitialRoundTripTimeUsToSend(stats->srtt.InMicroseconds()); |
853 } | 853 } |
854 } | 854 } |
855 | 855 |
856 *session = new QuicClientSession( | 856 *session = new QuicClientSession( |
857 connection, socket.Pass(), writer.Pass(), this, server_info.Pass(), | 857 connection, socket.Pass(), writer.Pass(), this, |
858 config, base::MessageLoop::current()->message_loop_proxy().get(), | 858 quic_crypto_client_stream_factory_, server_info.Pass(), server_id, |
| 859 config, &crypto_config_, |
| 860 base::MessageLoop::current()->message_loop_proxy().get(), |
859 net_log.net_log()); | 861 net_log.net_log()); |
860 (*session)->InitializeSession(server_id, &crypto_config_, | 862 (*session)->InitializeSession(); |
861 quic_crypto_client_stream_factory_); | |
862 all_sessions_[*session] = server_id; // owning pointer | 863 all_sessions_[*session] = server_id; // owning pointer |
863 return OK; | 864 return OK; |
864 } | 865 } |
865 | 866 |
866 bool QuicStreamFactory::HasActiveJob(const QuicServerId& key) const { | 867 bool QuicStreamFactory::HasActiveJob(const QuicServerId& key) const { |
867 return ContainsKey(active_jobs_, key); | 868 return ContainsKey(active_jobs_, key); |
868 } | 869 } |
869 | 870 |
870 void QuicStreamFactory::ActivateSession( | 871 void QuicStreamFactory::ActivateSession( |
871 const QuicServerId& server_id, | 872 const QuicServerId& server_id, |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
953 http_server_properties_->ClearAlternateProtocol(server); | 954 http_server_properties_->ClearAlternateProtocol(server); |
954 http_server_properties_->SetAlternateProtocol( | 955 http_server_properties_->SetAlternateProtocol( |
955 server, alternate.port, alternate.protocol, 1); | 956 server, alternate.port, alternate.protocol, 1); |
956 DCHECK_EQ(QUIC, | 957 DCHECK_EQ(QUIC, |
957 http_server_properties_->GetAlternateProtocol(server).protocol); | 958 http_server_properties_->GetAlternateProtocol(server).protocol); |
958 DCHECK(http_server_properties_->WasAlternateProtocolRecentlyBroken( | 959 DCHECK(http_server_properties_->WasAlternateProtocolRecentlyBroken( |
959 server)); | 960 server)); |
960 } | 961 } |
961 | 962 |
962 } // namespace net | 963 } // namespace net |
OLD | NEW |