summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-30 20:01:39 +0000
committerrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-30 20:01:39 +0000
commitebb3ad52433c978a914d0b387690dc98c791736a (patch)
tree539a912b16155b957860d27557f39fac30142d03 /net
parent87643df53ffe38b161df741dbd2a788fadff5dc8 (diff)
downloadchromium_src-ebb3ad52433c978a914d0b387690dc98c791736a.zip
chromium_src-ebb3ad52433c978a914d0b387690dc98c791736a.tar.gz
chromium_src-ebb3ad52433c978a914d0b387690dc98c791736a.tar.bz2
Enable QUIC's time based loss detection algorithm
via command line flag or field trial. Review URL: https://codereview.chromium.org/262503002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267313 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/http/http_network_session.cc6
-rw-r--r--net/http/http_network_session.h1
-rw-r--r--net/quic/quic_stream_factory.cc5
-rw-r--r--net/quic/quic_stream_factory.h3
-rw-r--r--net/quic/quic_stream_factory_test.cc2
5 files changed, 13 insertions, 4 deletions
diff --git a/net/http/http_network_session.cc b/net/http/http_network_session.cc
index b66c2ca..6e7ef66 100644
--- a/net/http/http_network_session.cc
+++ b/net/http/http_network_session.cc
@@ -84,6 +84,7 @@ HttpNetworkSession::Params::Params()
enable_quic_https(false),
enable_quic_port_selection(true),
enable_quic_pacing(false),
+ enable_quic_time_based_loss_detection(false),
enable_quic_persist_server_info(false),
quic_clock(NULL),
quic_random(NULL),
@@ -123,7 +124,8 @@ HttpNetworkSession::HttpNetworkSession(const Params& params)
params.quic_max_packet_length,
params.quic_supported_versions,
params.enable_quic_port_selection,
- params.enable_quic_pacing),
+ params.enable_quic_pacing,
+ params.enable_quic_time_based_loss_detection),
spdy_session_pool_(params.host_resolver,
params.ssl_config_service,
params.http_server_properties,
@@ -213,6 +215,8 @@ base::Value* HttpNetworkSession::QuicInfoToValue() const {
params_.enable_quic_port_selection);
dict->SetBoolean("enable_quic_pacing",
params_.enable_quic_pacing);
+ dict->SetBoolean("enable_quic_time_based_loss_detection",
+ params_.enable_quic_time_based_loss_detection);
dict->SetBoolean("enable_quic_persist_server_info",
params_.enable_quic_persist_server_info);
dict->SetString("origin_to_force_quic_on",
diff --git a/net/http/http_network_session.h b/net/http/http_network_session.h
index fd34dad..04bd6ec 100644
--- a/net/http/http_network_session.h
+++ b/net/http/http_network_session.h
@@ -91,6 +91,7 @@ class NET_EXPORT HttpNetworkSession
bool enable_quic_https;
bool enable_quic_port_selection;
bool enable_quic_pacing;
+ bool enable_quic_time_based_loss_detection;
bool enable_quic_persist_server_info;
HostPortPair origin_to_force_quic_on;
QuicClock* quic_clock; // Will be owned by QuicStreamFactory.
diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc
index 79859d1..5008ee8 100644
--- a/net/quic/quic_stream_factory.cc
+++ b/net/quic/quic_stream_factory.cc
@@ -392,7 +392,8 @@ QuicStreamFactory::QuicStreamFactory(
size_t max_packet_length,
const QuicVersionVector& supported_versions,
bool enable_port_selection,
- bool enable_pacing)
+ bool enable_pacing,
+ bool enable_time_based_loss_detection)
: require_confirmation_(true),
host_resolver_(host_resolver),
client_socket_factory_(client_socket_factory),
@@ -410,6 +411,8 @@ QuicStreamFactory::QuicStreamFactory(
weak_factory_(this) {
config_.SetDefaults();
config_.EnablePacing(enable_pacing_);
+ if (enable_time_based_loss_detection)
+ config_.SetLossDetectionToSend(kTIME);
config_.set_idle_connection_state_lifetime(
QuicTime::Delta::FromSeconds(30),
QuicTime::Delta::FromSeconds(30));
diff --git a/net/quic/quic_stream_factory.h b/net/quic/quic_stream_factory.h
index 9b5fdf2..079b652 100644
--- a/net/quic/quic_stream_factory.h
+++ b/net/quic/quic_stream_factory.h
@@ -97,7 +97,8 @@ class NET_EXPORT_PRIVATE QuicStreamFactory
size_t max_packet_length,
const QuicVersionVector& supported_versions,
bool enable_port_selection,
- bool enable_pacing);
+ bool enable_pacing,
+ bool enable_time_based_loss_detection);
virtual ~QuicStreamFactory();
// Creates a new QuicHttpStream to |host_port_pair| which will be
diff --git a/net/quic/quic_stream_factory_test.cc b/net/quic/quic_stream_factory_test.cc
index 9153dc2..e5b3a3e 100644
--- a/net/quic/quic_stream_factory_test.cc
+++ b/net/quic/quic_stream_factory_test.cc
@@ -94,7 +94,7 @@ class QuicStreamFactoryTest : public ::testing::TestWithParam<QuicVersion> {
cert_verifier_.get(),
&crypto_client_stream_factory_,
&random_generator_, clock_, kDefaultMaxPacketSize,
- SupportedVersions(GetParam()), true, true),
+ SupportedVersions(GetParam()), true, true, true),
host_port_pair_(kDefaultServerHostName, kDefaultServerPort),
is_https_(false),
privacy_mode_(PRIVACY_MODE_DISABLED) {