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

Unified Diff: net/quic/quic_stream_factory.cc

Issue 551903002: Adds ability to disable connection pooling in QUIC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit addressed. Created 6 years, 3 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_stream_factory.cc
diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc
index 35c695563b1631ddd1a36fc871d611a5f3a7016d..74b3aeb94b9ddcf933ef796a762820a61ef2b7a2 100644
--- a/net/quic/quic_stream_factory.cc
+++ b/net/quic/quic_stream_factory.cc
@@ -482,6 +482,7 @@ QuicStreamFactory::QuicStreamFactory(
bool enable_port_selection,
bool enable_time_based_loss_detection,
bool always_require_handshake_confirmation,
+ bool disable_connection_pooling,
const QuicTagVector& connection_options)
: require_confirmation_(true),
host_resolver_(host_resolver),
@@ -499,6 +500,7 @@ QuicStreamFactory::QuicStreamFactory(
enable_port_selection_(enable_port_selection),
always_require_handshake_confirmation_(
always_require_handshake_confirmation),
+ disable_connection_pooling_(disable_connection_pooling),
port_seed_(random_generator_->RandUint64()),
weak_factory_(this) {
DCHECK(transport_security_state_);
@@ -580,6 +582,9 @@ bool QuicStreamFactory::OnResolution(
const QuicServerId& server_id,
const AddressList& address_list) {
DCHECK(!HasActiveSession(server_id));
+ if (disable_connection_pooling_) {
+ return false;
+ }
for (size_t i = 0; i < address_list.size(); ++i) {
const IPEndPoint& address = address_list[i];
const IpAliasKey ip_alias_key(address, server_id.is_https());
« 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