Commit a2453ca5 authored by tbansal's avatar tbansal Committed by Commit bot

Do not mark QUIC as bad on network change events

This CL enables the experiment by default.

BUG=684761

Review-Url: https://codereview.chromium.org/2873243004
Cr-Commit-Position: refs/heads/master@{#471015}
parent 3a48bde6
...@@ -219,14 +219,6 @@ bool ShouldQuicAllowServerMigration( ...@@ -219,14 +219,6 @@ bool ShouldQuicAllowServerMigration(
"true"); "true");
} }
bool ShouldQuicDoNotMarkAsBrokenOnNetworkChange(
const VariationParameters& quic_trial_params) {
return base::LowerCaseEqualsASCII(
GetVariationParam(quic_trial_params,
"do_not_mark_as_broken_on_network_change"),
"true");
}
size_t GetQuicMaxPacketLength(const VariationParameters& quic_trial_params) { size_t GetQuicMaxPacketLength(const VariationParameters& quic_trial_params) {
unsigned value; unsigned value;
if (base::StringToUint( if (base::StringToUint(
...@@ -302,8 +294,6 @@ void ConfigureQuicParams(base::StringPiece quic_trial_group, ...@@ -302,8 +294,6 @@ void ConfigureQuicParams(base::StringPiece quic_trial_group,
ShouldQuicMigrateSessionsEarly(quic_trial_params); ShouldQuicMigrateSessionsEarly(quic_trial_params);
params->quic_allow_server_migration = params->quic_allow_server_migration =
ShouldQuicAllowServerMigration(quic_trial_params); ShouldQuicAllowServerMigration(quic_trial_params);
params->quic_do_not_mark_as_broken_on_network_change =
ShouldQuicDoNotMarkAsBrokenOnNetworkChange(quic_trial_params);
} }
size_t max_packet_length = GetQuicMaxPacketLength(quic_trial_params); size_t max_packet_length = GetQuicMaxPacketLength(quic_trial_params);
......
...@@ -142,7 +142,6 @@ HttpNetworkSession::Params::Params() ...@@ -142,7 +142,6 @@ HttpNetworkSession::Params::Params()
quic_force_hol_blocking(false), quic_force_hol_blocking(false),
quic_race_cert_verification(false), quic_race_cert_verification(false),
quic_do_not_fragment(false), quic_do_not_fragment(false),
quic_do_not_mark_as_broken_on_network_change(false),
quic_estimate_initial_rtt(false), quic_estimate_initial_rtt(false),
proxy_delegate(nullptr), proxy_delegate(nullptr),
enable_token_binding(false), enable_token_binding(false),
...@@ -345,8 +344,6 @@ std::unique_ptr<base::Value> HttpNetworkSession::QuicInfoToValue() const { ...@@ -345,8 +344,6 @@ std::unique_ptr<base::Value> HttpNetworkSession::QuicInfoToValue() const {
dict->SetBoolean("allow_server_migration", dict->SetBoolean("allow_server_migration",
params_.quic_allow_server_migration); params_.quic_allow_server_migration);
dict->SetBoolean("do_not_fragment", params_.quic_do_not_fragment); dict->SetBoolean("do_not_fragment", params_.quic_do_not_fragment);
dict->SetBoolean("do_not_mark_as_broken_on_network_change",
params_.quic_do_not_mark_as_broken_on_network_change);
dict->SetBoolean("estimate_initial_rtt", params_.quic_estimate_initial_rtt); dict->SetBoolean("estimate_initial_rtt", params_.quic_estimate_initial_rtt);
dict->SetBoolean("force_hol_blocking", params_.quic_force_hol_blocking); dict->SetBoolean("force_hol_blocking", params_.quic_force_hol_blocking);
......
...@@ -175,9 +175,6 @@ class NET_EXPORT HttpNetworkSession ...@@ -175,9 +175,6 @@ class NET_EXPORT HttpNetworkSession
bool quic_race_cert_verification; bool quic_race_cert_verification;
// If true, configure QUIC sockets to not fragment packets. // If true, configure QUIC sockets to not fragment packets.
bool quic_do_not_fragment; bool quic_do_not_fragment;
// If true, alternative service is not marked as broken if the alternative
// job fails due to a network change event.
bool quic_do_not_mark_as_broken_on_network_change;
// If true, estimate the initial RTT for QUIC connections based on network. // If true, estimate the initial RTT for QUIC connections based on network.
bool quic_estimate_initial_rtt; bool quic_estimate_initial_rtt;
......
...@@ -862,9 +862,8 @@ void HttpStreamFactoryImpl::JobController::ReportBrokenAlternativeService() { ...@@ -862,9 +862,8 @@ void HttpStreamFactoryImpl::JobController::ReportBrokenAlternativeService() {
UMA_HISTOGRAM_SPARSE_SLOWLY("Net.AlternateServiceFailed", UMA_HISTOGRAM_SPARSE_SLOWLY("Net.AlternateServiceFailed",
-alternative_job_net_error_); -alternative_job_net_error_);
if (session_->params().quic_do_not_mark_as_broken_on_network_change && if (alternative_job_net_error_ == ERR_NETWORK_CHANGED ||
(alternative_job_net_error_ == ERR_NETWORK_CHANGED || alternative_job_net_error_ == ERR_INTERNET_DISCONNECTED) {
alternative_job_net_error_ == ERR_INTERNET_DISCONNECTED)) {
// No need to mark alternative service or proxy as broken. // No need to mark alternative service or proxy as broken.
return; return;
} }
......
...@@ -641,7 +641,6 @@ TEST_F(HttpStreamFactoryImplJobControllerTest, ...@@ -641,7 +641,6 @@ TEST_F(HttpStreamFactoryImplJobControllerTest,
session_deps_.proxy_service.reset( session_deps_.proxy_service.reset(
new ProxyService(base::MakeUnique<ProxyConfigServiceFixed>(proxy_config), new ProxyService(base::MakeUnique<ProxyConfigServiceFixed>(proxy_config),
base::WrapUnique(proxy_resolver_factory), nullptr)); base::WrapUnique(proxy_resolver_factory), nullptr));
session_deps_.quic_do_not_mark_as_broken_on_network_change = true;
HttpRequestInfo request_info; HttpRequestInfo request_info;
request_info.method = "GET"; request_info.method = "GET";
......
...@@ -350,8 +350,7 @@ SpdySessionDependencies::SpdySessionDependencies( ...@@ -350,8 +350,7 @@ SpdySessionDependencies::SpdySessionDependencies(
time_func(&base::TimeTicks::Now), time_func(&base::TimeTicks::Now),
enable_http2_alternative_service(false), enable_http2_alternative_service(false),
net_log(nullptr), net_log(nullptr),
http_09_on_non_default_ports_enabled(false), http_09_on_non_default_ports_enabled(false) {
quic_do_not_mark_as_broken_on_network_change(false) {
// Note: The CancelledTransaction test does cleanup by running all // Note: The CancelledTransaction test does cleanup by running all
// tasks in the message loop (RunAllPending). Unfortunately, that // tasks in the message loop (RunAllPending). Unfortunately, that
// doesn't clean up tasks on the host resolver thread; and // doesn't clean up tasks on the host resolver thread; and
...@@ -418,8 +417,6 @@ HttpNetworkSession::Params SpdySessionDependencies::CreateSessionParams( ...@@ -418,8 +417,6 @@ HttpNetworkSession::Params SpdySessionDependencies::CreateSessionParams(
params.net_log = session_deps->net_log; params.net_log = session_deps->net_log;
params.http_09_on_non_default_ports_enabled = params.http_09_on_non_default_ports_enabled =
session_deps->http_09_on_non_default_ports_enabled; session_deps->http_09_on_non_default_ports_enabled;
params.quic_do_not_mark_as_broken_on_network_change =
session_deps->quic_do_not_mark_as_broken_on_network_change;
return params; return params;
} }
......
...@@ -216,7 +216,6 @@ struct SpdySessionDependencies { ...@@ -216,7 +216,6 @@ struct SpdySessionDependencies {
bool enable_http2_alternative_service; bool enable_http2_alternative_service;
NetLog* net_log; NetLog* net_log;
bool http_09_on_non_default_ports_enabled; bool http_09_on_non_default_ports_enabled;
bool quic_do_not_mark_as_broken_on_network_change;
}; };
class SpdyURLRequestContext : public URLRequestContext { class SpdyURLRequestContext : public URLRequestContext {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment