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, | 857 server_id.host_port_pair(), connection, socket.Pass(), writer.Pass(), |
858 quic_crypto_client_stream_factory_, server_info.Pass(), server_id, | 858 this, quic_crypto_client_stream_factory_, server_info.Pass(), server_id, |
859 config, &crypto_config_, | 859 config, &crypto_config_, |
860 base::MessageLoop::current()->message_loop_proxy().get(), | 860 base::MessageLoop::current()->message_loop_proxy().get(), |
861 net_log.net_log()); | 861 net_log.net_log()); |
862 all_sessions_[*session] = server_id; // owning pointer | 862 all_sessions_[*session] = server_id; // owning pointer |
863 return OK; | 863 return OK; |
864 } | 864 } |
865 | 865 |
866 bool QuicStreamFactory::HasActiveJob(const QuicServerId& key) const { | 866 bool QuicStreamFactory::HasActiveJob(const QuicServerId& key) const { |
867 return ContainsKey(active_jobs_, key); | 867 return ContainsKey(active_jobs_, key); |
868 } | 868 } |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
953 http_server_properties_->ClearAlternateProtocol(server); | 953 http_server_properties_->ClearAlternateProtocol(server); |
954 http_server_properties_->SetAlternateProtocol( | 954 http_server_properties_->SetAlternateProtocol( |
955 server, alternate.port, alternate.protocol); | 955 server, alternate.port, alternate.protocol); |
956 DCHECK_EQ(QUIC, | 956 DCHECK_EQ(QUIC, |
957 http_server_properties_->GetAlternateProtocol(server).protocol); | 957 http_server_properties_->GetAlternateProtocol(server).protocol); |
958 DCHECK(http_server_properties_->WasAlternateProtocolRecentlyBroken( | 958 DCHECK(http_server_properties_->WasAlternateProtocolRecentlyBroken( |
959 server)); | 959 server)); |
960 } | 960 } |
961 | 961 |
962 } // namespace net | 962 } // namespace net |
OLD | NEW |