Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(629)

Side by Side Diff: net/quic/quic_stream_factory.cc

Issue 1216943003: Use the CT policy enforcer for QUIC, if specified. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/quic/quic_stream_factory.h ('k') | net/quic/quic_stream_factory_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 9
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 scoped_ptr<QuicHttpStream> QuicStreamRequest::ReleaseStream() { 545 scoped_ptr<QuicHttpStream> QuicStreamRequest::ReleaseStream() {
546 DCHECK(stream_); 546 DCHECK(stream_);
547 return stream_.Pass(); 547 return stream_.Pass();
548 } 548 }
549 549
550 QuicStreamFactory::QuicStreamFactory( 550 QuicStreamFactory::QuicStreamFactory(
551 HostResolver* host_resolver, 551 HostResolver* host_resolver,
552 ClientSocketFactory* client_socket_factory, 552 ClientSocketFactory* client_socket_factory,
553 base::WeakPtr<HttpServerProperties> http_server_properties, 553 base::WeakPtr<HttpServerProperties> http_server_properties,
554 CertVerifier* cert_verifier, 554 CertVerifier* cert_verifier,
555 CertPolicyEnforcer* cert_policy_enforcer,
555 ChannelIDService* channel_id_service, 556 ChannelIDService* channel_id_service,
556 TransportSecurityState* transport_security_state, 557 TransportSecurityState* transport_security_state,
557 QuicCryptoClientStreamFactory* quic_crypto_client_stream_factory, 558 QuicCryptoClientStreamFactory* quic_crypto_client_stream_factory,
558 QuicRandom* random_generator, 559 QuicRandom* random_generator,
559 QuicClock* clock, 560 QuicClock* clock,
560 size_t max_packet_length, 561 size_t max_packet_length,
561 const std::string& user_agent_id, 562 const std::string& user_agent_id,
562 const QuicVersionVector& supported_versions, 563 const QuicVersionVector& supported_versions,
563 bool enable_port_selection, 564 bool enable_port_selection,
564 bool always_require_handshake_confirmation, 565 bool always_require_handshake_confirmation,
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 socket_receive_buffer_size_(socket_receive_buffer_size), 612 socket_receive_buffer_size_(socket_receive_buffer_size),
612 port_seed_(random_generator_->RandUint64()), 613 port_seed_(random_generator_->RandUint64()),
613 check_persisted_supports_quic_(true), 614 check_persisted_supports_quic_(true),
614 task_runner_(nullptr), 615 task_runner_(nullptr),
615 weak_factory_(this) { 616 weak_factory_(this) {
616 DCHECK(transport_security_state_); 617 DCHECK(transport_security_state_);
617 crypto_config_.set_user_agent_id(user_agent_id); 618 crypto_config_.set_user_agent_id(user_agent_id);
618 crypto_config_.AddCanonicalSuffix(".c.youtube.com"); 619 crypto_config_.AddCanonicalSuffix(".c.youtube.com");
619 crypto_config_.AddCanonicalSuffix(".googlevideo.com"); 620 crypto_config_.AddCanonicalSuffix(".googlevideo.com");
620 crypto_config_.AddCanonicalSuffix(".googleusercontent.com"); 621 crypto_config_.AddCanonicalSuffix(".googleusercontent.com");
621 crypto_config_.SetProofVerifier( 622 crypto_config_.SetProofVerifier(new ProofVerifierChromium(
622 new ProofVerifierChromium(cert_verifier, transport_security_state)); 623 cert_verifier, cert_policy_enforcer, transport_security_state));
623 // TODO(rtenneti): http://crbug.com/487355. Temporary fix for b/20760730 until 624 // TODO(rtenneti): http://crbug.com/487355. Temporary fix for b/20760730 until
624 // channel_id_service is supported in cronet. 625 // channel_id_service is supported in cronet.
625 if (channel_id_service) { 626 if (channel_id_service) {
626 crypto_config_.SetChannelIDSource( 627 crypto_config_.SetChannelIDSource(
627 new ChannelIDSourceChromium(channel_id_service)); 628 new ChannelIDSourceChromium(channel_id_service));
628 } 629 }
629 #if defined(USE_OPENSSL) 630 #if defined(USE_OPENSSL)
630 crypto::EnsureOpenSSLInit(); 631 crypto::EnsureOpenSSLInit();
631 bool has_aes_hardware_support = !!EVP_has_aes_hardware(); 632 bool has_aes_hardware_support = !!EVP_has_aes_hardware();
632 #else 633 #else
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after
1399 // Since the session was active, there's no longer an 1400 // Since the session was active, there's no longer an
1400 // HttpStreamFactoryImpl::Job running which can mark it broken, unless the TCP 1401 // HttpStreamFactoryImpl::Job running which can mark it broken, unless the TCP
1401 // job also fails. So to avoid not using QUIC when we otherwise could, we mark 1402 // job also fails. So to avoid not using QUIC when we otherwise could, we mark
1402 // it as recently broken, which means that 0-RTT will be disabled but we'll 1403 // it as recently broken, which means that 0-RTT will be disabled but we'll
1403 // still race. 1404 // still race.
1404 http_server_properties_->MarkAlternativeServiceRecentlyBroken( 1405 http_server_properties_->MarkAlternativeServiceRecentlyBroken(
1405 alternative_service); 1406 alternative_service);
1406 } 1407 }
1407 1408
1408 } // namespace net 1409 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_stream_factory.h ('k') | net/quic/quic_stream_factory_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698