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

Unified Diff: net/http/http_server_properties_impl.cc

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: Always update memory cache Created 5 years, 7 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 | « net/http/http_server_properties_impl.h ('k') | net/http/http_server_properties_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_server_properties_impl.cc
diff --git a/net/http/http_server_properties_impl.cc b/net/http/http_server_properties_impl.cc
index 1265ef34963978f12530bbbf368a20f1f43a40da..8b903e014de98cf3e909394adc2e2383a585d557 100644
--- a/net/http/http_server_properties_impl.cc
+++ b/net/http/http_server_properties_impl.cc
@@ -489,10 +489,12 @@ void HttpServerPropertiesImpl::SetSupportsQuic(bool used_quic,
}
}
-void HttpServerPropertiesImpl::SetServerNetworkStats(
+bool HttpServerPropertiesImpl::SetServerNetworkStats(
const HostPortPair& host_port_pair,
ServerNetworkStats stats) {
+ const ServerNetworkStats* old_stats = GetServerNetworkStats(host_port_pair);
server_network_stats_map_.Put(host_port_pair, stats);
+ return !old_stats || *old_stats != stats;
ramant (doing other things) 2015/05/28 22:33:38 Hi Ryan, Made a small change to update the Memor
ramant (doing other things) 2015/06/03 21:37:00 Please ignore this comment.
}
const ServerNetworkStats* HttpServerPropertiesImpl::GetServerNetworkStats(
« no previous file with comments | « net/http/http_server_properties_impl.h ('k') | net/http/http_server_properties_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698