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 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
571 port_seed_(random_generator_->RandUint64()), | 571 port_seed_(random_generator_->RandUint64()), |
572 check_persisted_supports_quic_(true), | 572 check_persisted_supports_quic_(true), |
573 task_runner_(nullptr), | 573 task_runner_(nullptr), |
574 weak_factory_(this) { | 574 weak_factory_(this) { |
575 DCHECK(transport_security_state_); | 575 DCHECK(transport_security_state_); |
576 crypto_config_.set_user_agent_id(user_agent_id); | 576 crypto_config_.set_user_agent_id(user_agent_id); |
577 crypto_config_.AddCanonicalSuffix(".c.youtube.com"); | 577 crypto_config_.AddCanonicalSuffix(".c.youtube.com"); |
578 crypto_config_.AddCanonicalSuffix(".googlevideo.com"); | 578 crypto_config_.AddCanonicalSuffix(".googlevideo.com"); |
579 crypto_config_.SetProofVerifier( | 579 crypto_config_.SetProofVerifier( |
580 new ProofVerifierChromium(cert_verifier, transport_security_state)); | 580 new ProofVerifierChromium(cert_verifier, transport_security_state)); |
581 crypto_config_.SetChannelIDSource( | 581 // TODO(rtenneti): http://crbug.com/487355. Temporary fix for b/20760730 until |
582 new ChannelIDSourceChromium(channel_id_service)); | 582 // channel_id_service is supported in cronet. |
583 if (channel_id_service) { | |
584 crypto_config_.SetChannelIDSource( | |
mef
2015/05/12 20:04:03
Is it safe? What would happen here: https://code.g
Ryan Hamilton
2015/05/12 20:23:19
I *think* it's ok because of the call to RequiresC
mef
2015/05/12 20:26:18
Ah, right, RequiresChannelID() has a check for cry
| |
585 new ChannelIDSourceChromium(channel_id_service)); | |
586 } | |
583 base::CPU cpu; | 587 base::CPU cpu; |
584 if (cpu.has_aesni() && cpu.has_avx()) | 588 if (cpu.has_aesni() && cpu.has_avx()) |
585 crypto_config_.PreferAesGcm(); | 589 crypto_config_.PreferAesGcm(); |
586 if (!IsEcdsaSupported()) | 590 if (!IsEcdsaSupported()) |
587 crypto_config_.DisableEcdsa(); | 591 crypto_config_.DisableEcdsa(); |
588 } | 592 } |
589 | 593 |
590 QuicStreamFactory::~QuicStreamFactory() { | 594 QuicStreamFactory::~QuicStreamFactory() { |
591 CloseAllSessions(ERR_ABORTED); | 595 CloseAllSessions(ERR_ABORTED); |
592 while (!all_sessions_.empty()) { | 596 while (!all_sessions_.empty()) { |
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1206 // Since the session was active, there's no longer an | 1210 // Since the session was active, there's no longer an |
1207 // HttpStreamFactoryImpl::Job running which can mark it broken, unless the TCP | 1211 // HttpStreamFactoryImpl::Job running which can mark it broken, unless the TCP |
1208 // job also fails. So to avoid not using QUIC when we otherwise could, we mark | 1212 // job also fails. So to avoid not using QUIC when we otherwise could, we mark |
1209 // it as recently broken, which means that 0-RTT will be disabled but we'll | 1213 // it as recently broken, which means that 0-RTT will be disabled but we'll |
1210 // still race. | 1214 // still race. |
1211 http_server_properties_->MarkAlternativeServiceRecentlyBroken( | 1215 http_server_properties_->MarkAlternativeServiceRecentlyBroken( |
1212 alternative_service); | 1216 alternative_service); |
1213 } | 1217 } |
1214 | 1218 |
1215 } // namespace net | 1219 } // namespace net |
OLD | NEW |