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

Unified Diff: net/http/http_server_properties_impl.cc

Issue 1159853005: HttpServerProperties - Don't persist if SetSupportsSpdy is called with (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@persist_SET_SERVER_NETWORK_STATS
Patch Set: Minor cleanup 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_manager.h » ('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 bbf30c8b2f31f330611d66199ee191fa77816568..4e6eeec8259f45c4ad376676f55312255e8045fa 100644
--- a/net/http/http_server_properties_impl.cc
+++ b/net/http/http_server_properties_impl.cc
@@ -157,9 +157,7 @@ bool HttpServerPropertiesImpl::SupportsRequestPriority(
if (host_port_pair.host().empty())
return false;
- SpdyServerHostPortMap::iterator spdy_host_port =
- spdy_servers_map_.Get(host_port_pair.ToString());
- if (spdy_host_port != spdy_servers_map_.end() && spdy_host_port->second)
+ if (GetSupportsSpdy(host_port_pair))
return true;
const AlternativeService alternative_service =
@@ -167,6 +165,17 @@ bool HttpServerPropertiesImpl::SupportsRequestPriority(
return alternative_service.protocol == QUIC;
}
+bool HttpServerPropertiesImpl::GetSupportsSpdy(
+ const HostPortPair& host_port_pair) {
+ DCHECK(CalledOnValidThread());
+ if (host_port_pair.host().empty())
+ return false;
+
+ SpdyServerHostPortMap::iterator spdy_host_port =
+ spdy_servers_map_.Get(host_port_pair.ToString());
+ return spdy_host_port != spdy_servers_map_.end() && spdy_host_port->second;
+}
+
void HttpServerPropertiesImpl::SetSupportsSpdy(
const HostPortPair& host_port_pair,
bool support_spdy) {
« no previous file with comments | « net/http/http_server_properties_impl.h ('k') | net/http/http_server_properties_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698