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

Unified Diff: net/http/http_server_properties_impl.h

Issue 253903002: SPDY - persist 300 most recently used servers that support SPDY to preferences file (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Persist 300 MRU servers that support SPDY Created 6 years, 8 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.h ('k') | net/http/http_server_properties_impl.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.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_;
« no previous file with comments | « net/http/http_server_properties.h ('k') | net/http/http_server_properties_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698