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

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

Issue 1454993002: QUIC - Code to verify SCT tag with certificate transparency verifier (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase with TOT - use scoped_refptr<const CTLogVerifier> Created 5 years 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"
11 #include "base/metrics/field_trial.h" 11 #include "base/metrics/field_trial.h"
12 #include "base/metrics/histogram_macros.h" 12 #include "base/metrics/histogram_macros.h"
13 #include "base/metrics/sparse_histogram.h" 13 #include "base/metrics/sparse_histogram.h"
14 #include "base/rand_util.h" 14 #include "base/rand_util.h"
15 #include "base/single_thread_task_runner.h" 15 #include "base/single_thread_task_runner.h"
16 #include "base/stl_util.h" 16 #include "base/stl_util.h"
17 #include "base/strings/string_util.h" 17 #include "base/strings/string_util.h"
18 #include "base/strings/stringprintf.h" 18 #include "base/strings/stringprintf.h"
19 #include "base/thread_task_runner_handle.h" 19 #include "base/thread_task_runner_handle.h"
20 #include "base/values.h" 20 #include "base/values.h"
21 #include "net/base/net_errors.h" 21 #include "net/base/net_errors.h"
22 #include "net/base/socket_performance_watcher.h" 22 #include "net/base/socket_performance_watcher.h"
23 #include "net/base/socket_performance_watcher_factory.h" 23 #include "net/base/socket_performance_watcher_factory.h"
24 #include "net/cert/cert_verifier.h" 24 #include "net/cert/cert_verifier.h"
25 #include "net/cert/ct_verifier.h"
25 #include "net/dns/host_resolver.h" 26 #include "net/dns/host_resolver.h"
26 #include "net/dns/single_request_host_resolver.h" 27 #include "net/dns/single_request_host_resolver.h"
27 #include "net/http/http_server_properties.h" 28 #include "net/http/http_server_properties.h"
28 #include "net/quic/crypto/channel_id_chromium.h" 29 #include "net/quic/crypto/channel_id_chromium.h"
29 #include "net/quic/crypto/proof_verifier_chromium.h" 30 #include "net/quic/crypto/proof_verifier_chromium.h"
30 #include "net/quic/crypto/properties_based_quic_server_info.h" 31 #include "net/quic/crypto/properties_based_quic_server_info.h"
31 #include "net/quic/crypto/quic_random.h" 32 #include "net/quic/crypto/quic_random.h"
32 #include "net/quic/crypto/quic_server_info.h" 33 #include "net/quic/crypto/quic_server_info.h"
33 #include "net/quic/port_suggester.h" 34 #include "net/quic/port_suggester.h"
34 #include "net/quic/quic_chromium_client_session.h" 35 #include "net/quic/quic_chromium_client_session.h"
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 } 539 }
539 540
540 QuicStreamFactory::QuicStreamFactory( 541 QuicStreamFactory::QuicStreamFactory(
541 HostResolver* host_resolver, 542 HostResolver* host_resolver,
542 ClientSocketFactory* client_socket_factory, 543 ClientSocketFactory* client_socket_factory,
543 base::WeakPtr<HttpServerProperties> http_server_properties, 544 base::WeakPtr<HttpServerProperties> http_server_properties,
544 CertVerifier* cert_verifier, 545 CertVerifier* cert_verifier,
545 CertPolicyEnforcer* cert_policy_enforcer, 546 CertPolicyEnforcer* cert_policy_enforcer,
546 ChannelIDService* channel_id_service, 547 ChannelIDService* channel_id_service,
547 TransportSecurityState* transport_security_state, 548 TransportSecurityState* transport_security_state,
549 CTVerifier* cert_transparency_verifier,
548 SocketPerformanceWatcherFactory* socket_performance_watcher_factory, 550 SocketPerformanceWatcherFactory* socket_performance_watcher_factory,
549 QuicCryptoClientStreamFactory* quic_crypto_client_stream_factory, 551 QuicCryptoClientStreamFactory* quic_crypto_client_stream_factory,
550 QuicRandom* random_generator, 552 QuicRandom* random_generator,
551 QuicClock* clock, 553 QuicClock* clock,
552 size_t max_packet_length, 554 size_t max_packet_length,
553 const std::string& user_agent_id, 555 const std::string& user_agent_id,
554 const QuicVersionVector& supported_versions, 556 const QuicVersionVector& supported_versions,
555 bool enable_port_selection, 557 bool enable_port_selection,
556 bool always_require_handshake_confirmation, 558 bool always_require_handshake_confirmation,
557 bool disable_connection_pooling, 559 bool disable_connection_pooling,
(...skipping 10 matching lines...) Expand all
568 int socket_receive_buffer_size, 570 int socket_receive_buffer_size,
569 bool delay_tcp_race, 571 bool delay_tcp_race,
570 bool store_server_configs_in_properties, 572 bool store_server_configs_in_properties,
571 bool close_sessions_on_ip_change, 573 bool close_sessions_on_ip_change,
572 const QuicTagVector& connection_options) 574 const QuicTagVector& connection_options)
573 : require_confirmation_(true), 575 : require_confirmation_(true),
574 host_resolver_(host_resolver), 576 host_resolver_(host_resolver),
575 client_socket_factory_(client_socket_factory), 577 client_socket_factory_(client_socket_factory),
576 http_server_properties_(http_server_properties), 578 http_server_properties_(http_server_properties),
577 transport_security_state_(transport_security_state), 579 transport_security_state_(transport_security_state),
580 cert_transparency_verifier_(cert_transparency_verifier),
578 quic_crypto_client_stream_factory_(quic_crypto_client_stream_factory), 581 quic_crypto_client_stream_factory_(quic_crypto_client_stream_factory),
579 random_generator_(random_generator), 582 random_generator_(random_generator),
580 clock_(clock), 583 clock_(clock),
581 max_packet_length_(max_packet_length), 584 max_packet_length_(max_packet_length),
582 socket_performance_watcher_factory_(socket_performance_watcher_factory), 585 socket_performance_watcher_factory_(socket_performance_watcher_factory),
583 config_(InitializeQuicConfig(connection_options)), 586 config_(InitializeQuicConfig(connection_options)),
584 crypto_config_(new ProofVerifierChromium(cert_verifier, 587 crypto_config_(new ProofVerifierChromium(cert_verifier,
585 cert_policy_enforcer, 588 cert_policy_enforcer,
586 transport_security_state)), 589 transport_security_state,
590 cert_transparency_verifier)),
587 supported_versions_(supported_versions), 591 supported_versions_(supported_versions),
588 enable_port_selection_(enable_port_selection), 592 enable_port_selection_(enable_port_selection),
589 always_require_handshake_confirmation_( 593 always_require_handshake_confirmation_(
590 always_require_handshake_confirmation), 594 always_require_handshake_confirmation),
591 disable_connection_pooling_(disable_connection_pooling), 595 disable_connection_pooling_(disable_connection_pooling),
592 load_server_info_timeout_srtt_multiplier_( 596 load_server_info_timeout_srtt_multiplier_(
593 load_server_info_timeout_srtt_multiplier), 597 load_server_info_timeout_srtt_multiplier),
594 enable_connection_racing_(enable_connection_racing), 598 enable_connection_racing_(enable_connection_racing),
595 enable_non_blocking_io_(enable_non_blocking_io), 599 enable_non_blocking_io_(enable_non_blocking_io),
596 disable_disk_cache_(disable_disk_cache), 600 disable_disk_cache_(disable_disk_cache),
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after
1448 // Since the session was active, there's no longer an 1452 // Since the session was active, there's no longer an
1449 // HttpStreamFactoryImpl::Job running which can mark it broken, unless the TCP 1453 // HttpStreamFactoryImpl::Job running which can mark it broken, unless the TCP
1450 // job also fails. So to avoid not using QUIC when we otherwise could, we mark 1454 // job also fails. So to avoid not using QUIC when we otherwise could, we mark
1451 // it as recently broken, which means that 0-RTT will be disabled but we'll 1455 // it as recently broken, which means that 0-RTT will be disabled but we'll
1452 // still race. 1456 // still race.
1453 http_server_properties_->MarkAlternativeServiceRecentlyBroken( 1457 http_server_properties_->MarkAlternativeServiceRecentlyBroken(
1454 alternative_service); 1458 alternative_service);
1455 } 1459 }
1456 1460
1457 } // namespace net 1461 } // 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