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 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 weak_factory_(this) { | 422 weak_factory_(this) { |
423 config_.SetDefaults(); | 423 config_.SetDefaults(); |
424 config_.EnablePacing(enable_pacing_); | 424 config_.EnablePacing(enable_pacing_); |
425 if (enable_time_based_loss_detection) | 425 if (enable_time_based_loss_detection) |
426 config_.SetLossDetectionToSend(kTIME); | 426 config_.SetLossDetectionToSend(kTIME); |
427 config_.set_idle_connection_state_lifetime( | 427 config_.set_idle_connection_state_lifetime( |
428 QuicTime::Delta::FromSeconds(30), | 428 QuicTime::Delta::FromSeconds(30), |
429 QuicTime::Delta::FromSeconds(30)); | 429 QuicTime::Delta::FromSeconds(30)); |
430 | 430 |
431 crypto_config_.SetDefaults(); | 431 crypto_config_.SetDefaults(); |
| 432 if (http_server_properties_) { |
| 433 crypto_config_.set_client_version( |
| 434 http_server_properties_->GetClientVersion()); |
| 435 } |
432 crypto_config_.AddCanonicalSuffix(".c.youtube.com"); | 436 crypto_config_.AddCanonicalSuffix(".c.youtube.com"); |
433 crypto_config_.AddCanonicalSuffix(".googlevideo.com"); | 437 crypto_config_.AddCanonicalSuffix(".googlevideo.com"); |
434 crypto_config_.SetProofVerifier(new ProofVerifierChromium(cert_verifier)); | 438 crypto_config_.SetProofVerifier(new ProofVerifierChromium(cert_verifier)); |
435 base::CPU cpu; | 439 base::CPU cpu; |
436 if (cpu.has_aesni() && cpu.has_avx()) | 440 if (cpu.has_aesni() && cpu.has_avx()) |
437 crypto_config_.PreferAesGcm(); | 441 crypto_config_.PreferAesGcm(); |
438 if (!IsEcdsaSupported()) | 442 if (!IsEcdsaSupported()) |
439 crypto_config_.DisableEcdsa(); | 443 crypto_config_.DisableEcdsa(); |
440 } | 444 } |
441 | 445 |
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
864 http_server_properties_->ClearAlternateProtocol(server); | 868 http_server_properties_->ClearAlternateProtocol(server); |
865 http_server_properties_->SetAlternateProtocol( | 869 http_server_properties_->SetAlternateProtocol( |
866 server, alternate.port, alternate.protocol); | 870 server, alternate.port, alternate.protocol); |
867 DCHECK_EQ(QUIC, | 871 DCHECK_EQ(QUIC, |
868 http_server_properties_->GetAlternateProtocol(server).protocol); | 872 http_server_properties_->GetAlternateProtocol(server).protocol); |
869 DCHECK(http_server_properties_->WasAlternateProtocolRecentlyBroken( | 873 DCHECK(http_server_properties_->WasAlternateProtocolRecentlyBroken( |
870 server)); | 874 server)); |
871 } | 875 } |
872 | 876 |
873 } // namespace net | 877 } // namespace net |
OLD | NEW |