Update HttpServerProperties::*AlternateProtocol* interface.
* Rename SetAlternateProtocol, WasAlternateProtocolRecentlyBroken,
ConfirmAlternateProtocol, ClearAlternateProtocol methods to
*AlternativeService*.
* Rename SetBrokenAlternateProtocol to MarkAlternativeServiceBroken.
* Make MarkAlternativeServiceBroken, WasAlternativeServiceRecentlyBroken, and
ConfirmAlternativeService take |alternative_service| instead of |origin|.
* Make SetAlternativeService take |alternative_service| instead of separate
|protocol|, |port| arguments. |alternative_service.host| is currently
ignored.
This CL does not rename SetAlternateProtocolProbabilityThreshold and
GetAlternateProtocolProbabilityThreshold methods or
alternate_protocol_probability_threshold_ members, that will come later.
[email protected]
BUG=392576
Review URL: https://codereview.chromium.org/1018943002
Cr-Commit-Position: refs/heads/master@{#321622}
diff --git a/net/quic/quic_network_transaction_unittest.cc b/net/quic/quic_network_transaction_unittest.cc
index 85d5a3d..80de2f5 100644
--- a/net/quic/quic_network_transaction_unittest.cc
+++ b/net/quic/quic_network_transaction_unittest.cc
@@ -294,8 +294,10 @@
void AddQuicAlternateProtocolMapping(
MockCryptoClientStream::HandshakeMode handshake_mode) {
crypto_client_stream_factory_.set_handshake_mode(handshake_mode);
- session_->http_server_properties()->SetAlternateProtocol(
- HostPortPair::FromURL(request_.url), 80, QUIC, 1);
+ HostPortPair host_port_pair = HostPortPair::FromURL(request_.url);
+ AlternativeService alternative_service(QUIC, host_port_pair.host(), 80);
+ session_->http_server_properties()->SetAlternativeService(
+ host_port_pair, alternative_service, 1.0);
}
void ExpectBrokenAlternateProtocolMapping() {