Index: net/http/http_server_properties.cc |
diff --git a/net/http/http_server_properties.cc b/net/http/http_server_properties.cc |
index 386a00d0fe3e53c356865c2ce47088f3e245e1b0..1f919601b06481ee13e4c3646fdfa22c44db919f 100644 |
--- a/net/http/http_server_properties.cc |
+++ b/net/http/http_server_properties.cc |
@@ -7,6 +7,7 @@ |
#include "base/logging.h" |
#include "base/metrics/histogram_macros.h" |
#include "base/strings/stringprintf.h" |
+#include "net/http/http_network_session.h" |
#include "net/socket/ssl_client_socket.h" |
#include "net/ssl/ssl_config.h" |
@@ -78,6 +79,32 @@ bool IsAlternateProtocolValid(NextProto protocol) { |
return false; |
} |
+AlternativeServiceInfo::AlternativeServiceInfo() : alternative_service() {} |
+ |
+AlternativeServiceInfo::~AlternativeServiceInfo() {} |
+ |
+AlternativeServiceInfo::AlternativeServiceInfo( |
+ const AlternativeService& alternative_service, |
+ base::Time expiration) |
+ : alternative_service(alternative_service), expiration(expiration) {} |
+ |
+AlternativeServiceInfo::AlternativeServiceInfo( |
+ const AlternativeService& alternative_service, |
+ base::Time expiration, |
+ const QuicVersionVector& advertised_versions) |
+ : alternative_service(alternative_service), expiration(expiration) { |
+ if (alternative_service.protocol == kProtoQUIC) { |
+ advertised_versions_ = advertised_versions; |
+ std::sort(advertised_versions_.begin(), advertised_versions_.end()); |
+ } |
+} |
+ |
+AlternativeServiceInfo::AlternativeServiceInfo( |
+ const AlternativeServiceInfo& alternative_service_info) = default; |
+ |
+AlternativeServiceInfo& AlternativeServiceInfo::operator=( |
+ const AlternativeServiceInfo& alternative_service_info) = default; |
+ |
std::string AlternativeService::ToString() const { |
return base::StringPrintf("%s %s:%d", NextProtoToString(protocol), |
host.c_str(), port); |