Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2111)

Unified Diff: net/http/http_server_properties.h

Issue 1158823005: HttpServerProperties - Don't persist if SetServerNetworkStats is called (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@update_http_props
Patch Set: Rebase and fix valgrind error Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/http/http_server_properties_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_server_properties.h
diff --git a/net/http/http_server_properties.h b/net/http/http_server_properties.h
index 417a1d6b152a4c24e0f81eef1cb24b701df0cd3d..4192361187cdbb0684d3ceeb56193d4bcb937764 100644
--- a/net/http/http_server_properties.h
+++ b/net/http/http_server_properties.h
@@ -187,6 +187,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;
};
@@ -313,6 +321,7 @@ class NET_EXPORT HttpServerProperties {
virtual void SetSupportsQuic(bool used_quic,
const IPAddressNumber& last_address) = 0;
+ // Sets |stats| for |host_port_pair|.
virtual void SetServerNetworkStats(const HostPortPair& host_port_pair,
ServerNetworkStats stats) = 0;
« no previous file with comments | « no previous file | net/http/http_server_properties_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698