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

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

Issue 2830563002: Remove the unused "Disable non-blocking IO" QUIC experiment code. (Closed)
Patch Set: Rebase Created 3 years, 8 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/chromium/quic_stream_factory.h ('k') | net/quic/chromium/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/chromium/quic_stream_factory.h" 5 #include "net/quic/chromium/quic_stream_factory.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <tuple> 8 #include <tuple>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 ChannelIDService* channel_id_service, 648 ChannelIDService* channel_id_service,
649 TransportSecurityState* transport_security_state, 649 TransportSecurityState* transport_security_state,
650 CTVerifier* cert_transparency_verifier, 650 CTVerifier* cert_transparency_verifier,
651 SocketPerformanceWatcherFactory* socket_performance_watcher_factory, 651 SocketPerformanceWatcherFactory* socket_performance_watcher_factory,
652 QuicCryptoClientStreamFactory* quic_crypto_client_stream_factory, 652 QuicCryptoClientStreamFactory* quic_crypto_client_stream_factory,
653 QuicRandom* random_generator, 653 QuicRandom* random_generator,
654 QuicClock* clock, 654 QuicClock* clock,
655 size_t max_packet_length, 655 size_t max_packet_length,
656 const std::string& user_agent_id, 656 const std::string& user_agent_id,
657 const QuicVersionVector& supported_versions, 657 const QuicVersionVector& supported_versions,
658 bool enable_non_blocking_io,
659 bool store_server_configs_in_properties, 658 bool store_server_configs_in_properties,
660 bool close_sessions_on_ip_change, 659 bool close_sessions_on_ip_change,
661 bool mark_quic_broken_when_network_blackholes, 660 bool mark_quic_broken_when_network_blackholes,
662 int idle_connection_timeout_seconds, 661 int idle_connection_timeout_seconds,
663 int reduced_ping_timeout_seconds, 662 int reduced_ping_timeout_seconds,
664 int packet_reader_yield_after_duration_milliseconds, 663 int packet_reader_yield_after_duration_milliseconds,
665 bool migrate_sessions_on_network_change, 664 bool migrate_sessions_on_network_change,
666 bool migrate_sessions_early, 665 bool migrate_sessions_early,
667 bool allow_server_migration, 666 bool allow_server_migration,
668 bool force_hol_blocking, 667 bool force_hol_blocking,
(...skipping 18 matching lines...) Expand all
687 clock_skew_detector_(base::TimeTicks::Now(), base::Time::Now()), 686 clock_skew_detector_(base::TimeTicks::Now(), base::Time::Now()),
688 socket_performance_watcher_factory_(socket_performance_watcher_factory), 687 socket_performance_watcher_factory_(socket_performance_watcher_factory),
689 config_(InitializeQuicConfig(connection_options, 688 config_(InitializeQuicConfig(connection_options,
690 idle_connection_timeout_seconds)), 689 idle_connection_timeout_seconds)),
691 crypto_config_(base::WrapUnique( 690 crypto_config_(base::WrapUnique(
692 new ProofVerifierChromium(cert_verifier, 691 new ProofVerifierChromium(cert_verifier,
693 ct_policy_enforcer, 692 ct_policy_enforcer,
694 transport_security_state, 693 transport_security_state,
695 cert_transparency_verifier))), 694 cert_transparency_verifier))),
696 supported_versions_(supported_versions), 695 supported_versions_(supported_versions),
697 enable_non_blocking_io_(enable_non_blocking_io),
698 mark_quic_broken_when_network_blackholes_( 696 mark_quic_broken_when_network_blackholes_(
699 mark_quic_broken_when_network_blackholes), 697 mark_quic_broken_when_network_blackholes),
700 store_server_configs_in_properties_(store_server_configs_in_properties), 698 store_server_configs_in_properties_(store_server_configs_in_properties),
701 ping_timeout_(QuicTime::Delta::FromSeconds(kPingTimeoutSecs)), 699 ping_timeout_(QuicTime::Delta::FromSeconds(kPingTimeoutSecs)),
702 reduced_ping_timeout_( 700 reduced_ping_timeout_(
703 QuicTime::Delta::FromSeconds(reduced_ping_timeout_seconds)), 701 QuicTime::Delta::FromSeconds(reduced_ping_timeout_seconds)),
704 yield_after_packets_(kQuicYieldAfterPacketsRead), 702 yield_after_packets_(kQuicYieldAfterPacketsRead),
705 yield_after_duration_(QuicTime::Delta::FromMilliseconds( 703 yield_after_duration_(QuicTime::Delta::FromMilliseconds(
706 packet_reader_yield_after_duration_milliseconds)), 704 packet_reader_yield_after_duration_milliseconds)),
707 close_sessions_on_ip_change_(close_sessions_on_ip_change), 705 close_sessions_on_ip_change_(close_sessions_on_ip_change),
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
1417 } 1415 }
1418 1416
1419 bool QuicStreamFactory::HasActiveCertVerifierJob( 1417 bool QuicStreamFactory::HasActiveCertVerifierJob(
1420 const QuicServerId& server_id) const { 1418 const QuicServerId& server_id) const {
1421 return base::ContainsKey(active_cert_verifier_jobs_, server_id); 1419 return base::ContainsKey(active_cert_verifier_jobs_, server_id);
1422 } 1420 }
1423 1421
1424 int QuicStreamFactory::ConfigureSocket(DatagramClientSocket* socket, 1422 int QuicStreamFactory::ConfigureSocket(DatagramClientSocket* socket,
1425 IPEndPoint addr, 1423 IPEndPoint addr,
1426 NetworkHandle network) { 1424 NetworkHandle network) {
1427 if (enable_non_blocking_io_) 1425 socket->UseNonBlockingIO();
1428 socket->UseNonBlockingIO();
1429 1426
1430 int rv; 1427 int rv;
1431 if (migrate_sessions_on_network_change_) { 1428 if (migrate_sessions_on_network_change_) {
1432 // If caller leaves network unspecified, use current default network. 1429 // If caller leaves network unspecified, use current default network.
1433 if (network == NetworkChangeNotifier::kInvalidNetworkHandle) { 1430 if (network == NetworkChangeNotifier::kInvalidNetworkHandle) {
1434 rv = socket->ConnectUsingDefaultNetwork(addr); 1431 rv = socket->ConnectUsingDefaultNetwork(addr);
1435 } else { 1432 } else {
1436 rv = socket->ConnectUsingNetwork(network, addr); 1433 rv = socket->ConnectUsingNetwork(network, addr);
1437 } 1434 }
1438 } else { 1435 } else {
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
1735 // Since the session was active, there's no longer an 1732 // Since the session was active, there's no longer an
1736 // HttpStreamFactoryImpl::Job running which can mark it broken, unless the TCP 1733 // HttpStreamFactoryImpl::Job running which can mark it broken, unless the TCP
1737 // job also fails. So to avoid not using QUIC when we otherwise could, we mark 1734 // job also fails. So to avoid not using QUIC when we otherwise could, we mark
1738 // it as recently broken, which means that 0-RTT will be disabled but we'll 1735 // it as recently broken, which means that 0-RTT will be disabled but we'll
1739 // still race. 1736 // still race.
1740 http_server_properties_->MarkAlternativeServiceRecentlyBroken( 1737 http_server_properties_->MarkAlternativeServiceRecentlyBroken(
1741 alternative_service); 1738 alternative_service);
1742 } 1739 }
1743 1740
1744 } // namespace net 1741 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/chromium/quic_stream_factory.h ('k') | net/quic/chromium/quic_stream_factory_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698