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