Add Alternative Service field trial.
Before this CL:
* If "use_alternative_service" QUIC trial param was set, both same host and
different host Alt-Svc headers were parsed and used. If this param was not
set, no Alt-Svc headers were parsed, and in-memory entries (from
Alternate-protocol headers or loaded from disk) were only used if they
referred to the same host.
After this CL:
* AltSvc field trial controls whether Alt-Svc headers are parsed.
* "enable_alternative_service_with_different_host" QUIC trial param control
whether in-memory Alt-Svc entries with different host (parsed in current
session or loaded from disk) are used.
Default values are not changed by this CL.
This CL allows testing of same-host Alt-Svc header behavior. If no issues are
encountered, parsing Alt-Svc headers and using same-host entries can be enabled
by default, and Alternate-Protocols removed.
BUG=581331
Review URL: https://codereview.chromium.org/1639913002
Cr-Commit-Position: refs/heads/master@{#372348}
diff --git a/net/quic/quic_network_transaction_unittest.cc b/net/quic/quic_network_transaction_unittest.cc
index d6f5c3c..f161588 100644
--- a/net/quic/quic_network_transaction_unittest.cc
+++ b/net/quic/quic_network_transaction_unittest.cc
@@ -442,7 +442,8 @@
test_network_quality_estimator_->AddRTTObserver(&rtt_observer_);
if (use_next_protos) {
- params_.use_alternative_services = true;
+ params_.parse_alternative_services = true;
+ params_.enable_alternative_service_with_different_host = true;
params_.next_protos = NextProtosWithSpdyAndQuic(true, true);
}