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/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/message_loop_proxy.h" | 10 #include "base/message_loop_proxy.h" |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 client_socket_factory_(client_socket_factory), | 227 client_socket_factory_(client_socket_factory), |
228 quic_crypto_client_stream_factory_(quic_crypto_client_stream_factory), | 228 quic_crypto_client_stream_factory_(quic_crypto_client_stream_factory), |
229 random_generator_(random_generator), | 229 random_generator_(random_generator), |
230 clock_(clock), | 230 clock_(clock), |
231 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) { | 231 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) { |
232 } | 232 } |
233 | 233 |
234 QuicStreamFactory::~QuicStreamFactory() { | 234 QuicStreamFactory::~QuicStreamFactory() { |
235 STLDeleteElements(&all_sessions_); | 235 STLDeleteElements(&all_sessions_); |
236 STLDeleteValues(&active_jobs_); | 236 STLDeleteValues(&active_jobs_); |
| 237 STLDeleteValues(&all_crypto_configs_); |
237 } | 238 } |
238 | 239 |
239 int QuicStreamFactory::Create(const HostPortProxyPair& host_port_proxy_pair, | 240 int QuicStreamFactory::Create(const HostPortProxyPair& host_port_proxy_pair, |
240 const BoundNetLog& net_log, | 241 const BoundNetLog& net_log, |
241 QuicStreamRequest* request) { | 242 QuicStreamRequest* request) { |
242 if (HasActiveSession(host_port_proxy_pair)) { | 243 if (HasActiveSession(host_port_proxy_pair)) { |
243 request->set_stream(CreateIfSessionExists(host_port_proxy_pair, net_log)); | 244 request->set_stream(CreateIfSessionExists(host_port_proxy_pair, net_log)); |
244 return OK; | 245 return OK; |
245 } | 246 } |
246 | 247 |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 DCHECK(crypto_config); | 413 DCHECK(crypto_config); |
413 } else { | 414 } else { |
414 crypto_config = new QuicCryptoClientConfig(); | 415 crypto_config = new QuicCryptoClientConfig(); |
415 crypto_config->SetDefaults(); | 416 crypto_config->SetDefaults(); |
416 all_crypto_configs_[host_port_proxy_pair] = crypto_config; | 417 all_crypto_configs_[host_port_proxy_pair] = crypto_config; |
417 } | 418 } |
418 return crypto_config; | 419 return crypto_config; |
419 } | 420 } |
420 | 421 |
421 } // namespace net | 422 } // namespace net |
OLD | NEW |