Index: net/http/http_server_properties_impl.h |
diff --git a/net/http/http_server_properties_impl.h b/net/http/http_server_properties_impl.h |
index b03f357d413666e1098e1032f949efa9416856e1..13af9a92771aff61eef07496d5d540e8e7d878c2 100644 |
--- a/net/http/http_server_properties_impl.h |
+++ b/net/http/http_server_properties_impl.h |
@@ -34,7 +34,7 @@ class NET_EXPORT HttpServerPropertiesImpl |
HttpServerPropertiesImpl(); |
virtual ~HttpServerPropertiesImpl(); |
- // Initializes |spdy_servers_table_| with the servers (host/port) from |
+ // Initializes |spdy_servers_map_| with the servers (host/port) from |
// |spdy_servers| that either support SPDY or not. |
void InitializeSpdyServers(std::vector<std::string>* spdy_servers, |
bool support_spdy); |
@@ -49,8 +49,10 @@ class NET_EXPORT HttpServerPropertiesImpl |
void InitializePipelineCapabilities( |
const PipelineCapabilityMap* pipeline_capability_map); |
- // Get the list of servers (host/port) that support SPDY. |
- void GetSpdyServerList(base::ListValue* spdy_server_list) const; |
+ // Get the list of servers (host/port) that support SPDY. The max_size is the |
+ // number of MRU servers that support SPDY that are to be returned. |
+ void GetSpdyServerList(base::ListValue* spdy_server_list, |
+ size_t max_size) const; |
// Returns flattened string representation of the |host_port_pair|. Used by |
// unittests. |
@@ -80,7 +82,7 @@ class NET_EXPORT HttpServerPropertiesImpl |
virtual void Clear() OVERRIDE; |
// Returns true if |server| supports SPDY. |
- virtual bool SupportsSpdy(const HostPortPair& server) const OVERRIDE; |
+ virtual bool SupportsSpdy(const HostPortPair& server) OVERRIDE; |
// Add |server| into the persistent store. |
virtual void SetSupportsSpdy(const HostPortPair& server, |
@@ -157,9 +159,9 @@ class NET_EXPORT HttpServerPropertiesImpl |
private: |
typedef base::MRUCache< |
HostPortPair, HttpPipelinedHostCapability> CachedPipelineCapabilityMap; |
- // |spdy_servers_table_| has flattened representation of servers (host/port |
- // pair) that either support or not support SPDY protocol. |
- typedef base::hash_map<std::string, bool> SpdyServerHostPortTable; |
+ // |spdy_servers_map_| has flattened representation of servers (host, port) |
+ // that either support or not support SPDY protocol. |
+ typedef base::MRUCache<std::string, bool> SpdyServerHostPortMap; |
typedef std::map<HostPortPair, NetworkStats> ServerNetworkStatsMap; |
typedef std::map<HostPortPair, HostPortPair> CanonicalHostMap; |
typedef std::vector<std::string> CanonicalSufficList; |
@@ -180,7 +182,7 @@ class NET_EXPORT HttpServerPropertiesImpl |
void ExpireBrokenAlternateProtocolMappings(); |
void ScheduleBrokenAlternateProtocolMappingsExpiration(); |
- SpdyServerHostPortTable spdy_servers_table_; |
+ SpdyServerHostPortMap spdy_servers_map_; |
AlternateProtocolMap alternate_protocol_map_; |
BrokenAlternateProtocolList broken_alternate_protocol_list_; |