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 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 connection_options)), | 478 connection_options)), |
479 supported_versions_(supported_versions), | 479 supported_versions_(supported_versions), |
480 enable_port_selection_(enable_port_selection), | 480 enable_port_selection_(enable_port_selection), |
481 port_seed_(random_generator_->RandUint64()), | 481 port_seed_(random_generator_->RandUint64()), |
482 weak_factory_(this) { | 482 weak_factory_(this) { |
483 crypto_config_.SetDefaults(); | 483 crypto_config_.SetDefaults(); |
484 crypto_config_.set_user_agent_id(user_agent_id); | 484 crypto_config_.set_user_agent_id(user_agent_id); |
485 crypto_config_.AddCanonicalSuffix(".c.youtube.com"); | 485 crypto_config_.AddCanonicalSuffix(".c.youtube.com"); |
486 crypto_config_.AddCanonicalSuffix(".googlevideo.com"); | 486 crypto_config_.AddCanonicalSuffix(".googlevideo.com"); |
487 crypto_config_.SetProofVerifier(new ProofVerifierChromium(cert_verifier)); | 487 crypto_config_.SetProofVerifier(new ProofVerifierChromium(cert_verifier)); |
| 488 // TODO(wtc): a temporary change to investigate the performance degradation |
| 489 // caused by Channel ID lookup. |
| 490 #if 0 |
488 crypto_config_.SetChannelIDSource( | 491 crypto_config_.SetChannelIDSource( |
489 new ChannelIDSourceChromium(server_bound_cert_service)); | 492 new ChannelIDSourceChromium(server_bound_cert_service)); |
| 493 #endif |
490 base::CPU cpu; | 494 base::CPU cpu; |
491 if (cpu.has_aesni() && cpu.has_avx()) | 495 if (cpu.has_aesni() && cpu.has_avx()) |
492 crypto_config_.PreferAesGcm(); | 496 crypto_config_.PreferAesGcm(); |
493 if (!IsEcdsaSupported()) | 497 if (!IsEcdsaSupported()) |
494 crypto_config_.DisableEcdsa(); | 498 crypto_config_.DisableEcdsa(); |
495 } | 499 } |
496 | 500 |
497 QuicStreamFactory::~QuicStreamFactory() { | 501 QuicStreamFactory::~QuicStreamFactory() { |
498 CloseAllSessions(ERR_ABORTED); | 502 CloseAllSessions(ERR_ABORTED); |
499 while (!all_sessions_.empty()) { | 503 while (!all_sessions_.empty()) { |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
953 http_server_properties_->ClearAlternateProtocol(server); | 957 http_server_properties_->ClearAlternateProtocol(server); |
954 http_server_properties_->SetAlternateProtocol( | 958 http_server_properties_->SetAlternateProtocol( |
955 server, alternate.port, alternate.protocol, 1); | 959 server, alternate.port, alternate.protocol, 1); |
956 DCHECK_EQ(QUIC, | 960 DCHECK_EQ(QUIC, |
957 http_server_properties_->GetAlternateProtocol(server).protocol); | 961 http_server_properties_->GetAlternateProtocol(server).protocol); |
958 DCHECK(http_server_properties_->WasAlternateProtocolRecentlyBroken( | 962 DCHECK(http_server_properties_->WasAlternateProtocolRecentlyBroken( |
959 server)); | 963 server)); |
960 } | 964 } |
961 | 965 |
962 } // namespace net | 966 } // namespace net |
OLD | NEW |