| 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/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 http_server_properties_(http_server_properties), | 254 http_server_properties_(http_server_properties), |
| 255 quic_crypto_client_stream_factory_(quic_crypto_client_stream_factory), | 255 quic_crypto_client_stream_factory_(quic_crypto_client_stream_factory), |
| 256 random_generator_(random_generator), | 256 random_generator_(random_generator), |
| 257 clock_(clock), | 257 clock_(clock), |
| 258 max_packet_length_(max_packet_length), | 258 max_packet_length_(max_packet_length), |
| 259 weak_factory_(this) { | 259 weak_factory_(this) { |
| 260 config_.SetDefaults(); | 260 config_.SetDefaults(); |
| 261 config_.set_idle_connection_state_lifetime( | 261 config_.set_idle_connection_state_lifetime( |
| 262 QuicTime::Delta::FromSeconds(30), | 262 QuicTime::Delta::FromSeconds(30), |
| 263 QuicTime::Delta::FromSeconds(30)); | 263 QuicTime::Delta::FromSeconds(30)); |
| 264 config_.set_server_initial_congestion_window(kDefaultInitialWindow, |
| 265 kDefaultInitialWindow); |
| 266 |
| 264 cannoncial_suffixes_.push_back(string(".c.youtube.com")); | 267 cannoncial_suffixes_.push_back(string(".c.youtube.com")); |
| 265 cannoncial_suffixes_.push_back(string(".googlevideo.com")); | 268 cannoncial_suffixes_.push_back(string(".googlevideo.com")); |
| 266 } | 269 } |
| 267 | 270 |
| 268 QuicStreamFactory::~QuicStreamFactory() { | 271 QuicStreamFactory::~QuicStreamFactory() { |
| 269 CloseAllSessions(ERR_ABORTED); | 272 CloseAllSessions(ERR_ABORTED); |
| 270 STLDeleteElements(&all_sessions_); | 273 STLDeleteElements(&all_sessions_); |
| 271 STLDeleteValues(&active_jobs_); | 274 STLDeleteValues(&active_jobs_); |
| 272 STLDeleteValues(&all_crypto_configs_); | 275 STLDeleteValues(&all_crypto_configs_); |
| 273 } | 276 } |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 // Copy the CachedState for the canonical server from canonical_crypto_config | 563 // Copy the CachedState for the canonical server from canonical_crypto_config |
| 561 // as the initial CachedState for the server_hostname in crypto_config. | 564 // as the initial CachedState for the server_hostname in crypto_config. |
| 562 crypto_config->InitializeFrom(server_hostname, | 565 crypto_config->InitializeFrom(server_hostname, |
| 563 canonical_host_port_proxy_pair.first.host(), | 566 canonical_host_port_proxy_pair.first.host(), |
| 564 canonical_crypto_config); | 567 canonical_crypto_config); |
| 565 // Update canonical version to point at the "most recent" crypto_config. | 568 // Update canonical version to point at the "most recent" crypto_config. |
| 566 canonical_hostname_to_origin_map_[canonical_host_port] = host_port_proxy_pair; | 569 canonical_hostname_to_origin_map_[canonical_host_port] = host_port_proxy_pair; |
| 567 } | 570 } |
| 568 | 571 |
| 569 } // namespace net | 572 } // namespace net |
| OLD | NEW |