| Index: net/http/http_server_properties.cc
|
| diff --git a/net/http/http_server_properties.cc b/net/http/http_server_properties.cc
|
| index fc6281e43b5b9c11405ab98936e04a1b668d7c36..50cda270c292265126aaa3bad921385095568339 100644
|
| --- a/net/http/http_server_properties.cc
|
| +++ b/net/http/http_server_properties.cc
|
| @@ -104,6 +104,37 @@ std::string AlternativeServiceInfo::ToString() const {
|
| exploded.minute, exploded.second);
|
| }
|
|
|
| +SchemeOriginPair::SchemeOriginPair() : host_port_pair_() {}
|
| +
|
| +SchemeOriginPair::SchemeOriginPair(const std::string& in_scheme,
|
| + const HostPortPair& in_host_port)
|
| + : SchemeOriginPair(in_scheme, in_host_port.host(), in_host_port.port()) {}
|
| +
|
| +SchemeOriginPair::SchemeOriginPair(const std::string& in_scheme,
|
| + const std::string& in_host,
|
| + uint16_t in_port)
|
| + : scheme_(in_scheme), host_port_pair_(in_host, in_port) {}
|
| +
|
| +// static
|
| +SchemeOriginPair SchemeOriginPair::FromURL(const GURL& url) {
|
| + return SchemeOriginPair(url.scheme(), url.HostNoBrackets(),
|
| + static_cast<uint16_t>(url.EffectiveIntPort()));
|
| +}
|
| +
|
| +bool SchemeOriginPair::Equals(const SchemeOriginPair& other) const {
|
| + return scheme_ == other.scheme_ &&
|
| + host_port_pair_.Equals(other.host_port_pair());
|
| +}
|
| +
|
| +bool SchemeOriginPair::IsEmpty() const {
|
| + return host_port_pair_.host().empty() && host_port_pair_.port() == 0;
|
| +}
|
| +
|
| +bool SchemeOriginPair::operator<(const SchemeOriginPair& other) const {
|
| + return std::tie(scheme_, host_port_pair_) <
|
| + std::tie(other.scheme_, other.host_port_pair_);
|
| +}
|
| +
|
| // static
|
| void HttpServerProperties::ForceHTTP11(SSLConfig* ssl_config) {
|
| ssl_config->alpn_protos.clear();
|
|
|