Index: net/http/http_server_properties.h |
diff --git a/net/http/http_server_properties.h b/net/http/http_server_properties.h |
index b9abd0da98368e2a799ace4f37511bed9f30cca8..c5cd78b08d83595b34f0dbfe176bf10600e0c552 100644 |
--- a/net/http/http_server_properties.h |
+++ b/net/http/http_server_properties.h |
@@ -183,6 +183,14 @@ struct NET_EXPORT SupportsQuic { |
struct NET_EXPORT ServerNetworkStats { |
ServerNetworkStats() : bandwidth_estimate(QuicBandwidth::Zero()) {} |
+ bool operator==(const ServerNetworkStats& other) const { |
+ return srtt == other.srtt && bandwidth_estimate == other.bandwidth_estimate; |
+ } |
+ |
+ bool operator!=(const ServerNetworkStats& other) const { |
+ return !this->operator==(other); |
+ } |
+ |
base::TimeDelta srtt; |
QuicBandwidth bandwidth_estimate; |
}; |
@@ -307,7 +315,9 @@ class NET_EXPORT HttpServerProperties { |
virtual void SetSupportsQuic(bool used_quic, |
const IPAddressNumber& last_address) = 0; |
- virtual void SetServerNetworkStats(const HostPortPair& host_port_pair, |
+ // Sets |stats| for |host_port_pair|. Returns true if |stats| is to be |
+ // persisted. |
+ virtual bool SetServerNetworkStats(const HostPortPair& host_port_pair, |
ServerNetworkStats stats) = 0; |
virtual const ServerNetworkStats* GetServerNetworkStats( |