| 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 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 869 if (http_server_properties_) { | 869 if (http_server_properties_) { |
| 870 const HttpServerProperties::NetworkStats* stats = | 870 const HttpServerProperties::NetworkStats* stats = |
| 871 http_server_properties_->GetServerNetworkStats( | 871 http_server_properties_->GetServerNetworkStats( |
| 872 server_id.host_port_pair()); | 872 server_id.host_port_pair()); |
| 873 if (stats != NULL) { | 873 if (stats != NULL) { |
| 874 config.SetInitialRoundTripTimeUsToSend(stats->srtt.InMicroseconds()); | 874 config.SetInitialRoundTripTimeUsToSend(stats->srtt.InMicroseconds()); |
| 875 } | 875 } |
| 876 } | 876 } |
| 877 | 877 |
| 878 *session = new QuicClientSession( | 878 *session = new QuicClientSession( |
| 879 connection, socket.Pass(), this, | 879 connection, socket.Pass(), this, transport_security_state_, |
| 880 quic_crypto_client_stream_factory_, transport_security_state_, | 880 server_info.Pass(), config, |
| 881 server_info.Pass(), server_id, config, &crypto_config_, | |
| 882 base::MessageLoop::current()->message_loop_proxy().get(), | 881 base::MessageLoop::current()->message_loop_proxy().get(), |
| 883 net_log.net_log()); | 882 net_log.net_log()); |
| 884 (*session)->InitializeSession(); | 883 (*session)->InitializeSession(server_id, &crypto_config_, |
| 884 quic_crypto_client_stream_factory_); |
| 885 all_sessions_[*session] = server_id; // owning pointer | 885 all_sessions_[*session] = server_id; // owning pointer |
| 886 return OK; | 886 return OK; |
| 887 } | 887 } |
| 888 | 888 |
| 889 bool QuicStreamFactory::HasActiveJob(const QuicServerId& key) const { | 889 bool QuicStreamFactory::HasActiveJob(const QuicServerId& key) const { |
| 890 return ContainsKey(active_jobs_, key); | 890 return ContainsKey(active_jobs_, key); |
| 891 } | 891 } |
| 892 | 892 |
| 893 void QuicStreamFactory::ActivateSession( | 893 void QuicStreamFactory::ActivateSession( |
| 894 const QuicServerId& server_id, | 894 const QuicServerId& server_id, |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 976 http_server_properties_->ClearAlternateProtocol(server); | 976 http_server_properties_->ClearAlternateProtocol(server); |
| 977 http_server_properties_->SetAlternateProtocol( | 977 http_server_properties_->SetAlternateProtocol( |
| 978 server, alternate.port, alternate.protocol, 1); | 978 server, alternate.port, alternate.protocol, 1); |
| 979 DCHECK_EQ(QUIC, | 979 DCHECK_EQ(QUIC, |
| 980 http_server_properties_->GetAlternateProtocol(server).protocol); | 980 http_server_properties_->GetAlternateProtocol(server).protocol); |
| 981 DCHECK(http_server_properties_->WasAlternateProtocolRecentlyBroken( | 981 DCHECK(http_server_properties_->WasAlternateProtocolRecentlyBroken( |
| 982 server)); | 982 server)); |
| 983 } | 983 } |
| 984 | 984 |
| 985 } // namespace net | 985 } // namespace net |
| OLD | NEW |