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 843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
854 const HttpServerProperties::NetworkStats* stats = | 854 const HttpServerProperties::NetworkStats* stats = |
855 http_server_properties_->GetServerNetworkStats( | 855 http_server_properties_->GetServerNetworkStats( |
856 server_id.host_port_pair()); | 856 server_id.host_port_pair()); |
857 if (stats != NULL) { | 857 if (stats != NULL) { |
858 config.SetInitialRoundTripTimeUsToSend(stats->srtt.InMicroseconds()); | 858 config.SetInitialRoundTripTimeUsToSend(stats->srtt.InMicroseconds()); |
859 } | 859 } |
860 } | 860 } |
861 | 861 |
862 *session = new QuicClientSession( | 862 *session = new QuicClientSession( |
863 connection, socket.Pass(), writer.Pass(), this, | 863 connection, socket.Pass(), writer.Pass(), this, |
864 quic_crypto_client_stream_factory_, transport_security_state_, | 864 quic_crypto_client_stream_factory_, server_info.Pass(), server_id, |
865 server_info.Pass(), server_id, config, &crypto_config_, | 865 config, &crypto_config_, |
866 base::MessageLoop::current()->message_loop_proxy().get(), | 866 base::MessageLoop::current()->message_loop_proxy().get(), |
867 net_log.net_log()); | 867 net_log.net_log()); |
868 (*session)->InitializeSession(); | 868 (*session)->InitializeSession(); |
869 all_sessions_[*session] = server_id; // owning pointer | 869 all_sessions_[*session] = server_id; // owning pointer |
870 return OK; | 870 return OK; |
871 } | 871 } |
872 | 872 |
873 bool QuicStreamFactory::HasActiveJob(const QuicServerId& key) const { | 873 bool QuicStreamFactory::HasActiveJob(const QuicServerId& key) const { |
874 return ContainsKey(active_jobs_, key); | 874 return ContainsKey(active_jobs_, key); |
875 } | 875 } |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
960 http_server_properties_->ClearAlternateProtocol(server); | 960 http_server_properties_->ClearAlternateProtocol(server); |
961 http_server_properties_->SetAlternateProtocol( | 961 http_server_properties_->SetAlternateProtocol( |
962 server, alternate.port, alternate.protocol, 1); | 962 server, alternate.port, alternate.protocol, 1); |
963 DCHECK_EQ(QUIC, | 963 DCHECK_EQ(QUIC, |
964 http_server_properties_->GetAlternateProtocol(server).protocol); | 964 http_server_properties_->GetAlternateProtocol(server).protocol); |
965 DCHECK(http_server_properties_->WasAlternateProtocolRecentlyBroken( | 965 DCHECK(http_server_properties_->WasAlternateProtocolRecentlyBroken( |
966 server)); | 966 server)); |
967 } | 967 } |
968 | 968 |
969 } // namespace net | 969 } // namespace net |
OLD | NEW |