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

Unified Diff: net/http/http_server_properties_impl.h

Issue 182383016: HttpServerProperties - Implement MRU for AlternateProtocolMap. Persist (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Increment the iterator before calling Erase Created 6 years, 10 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
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 bb91f3d256eb0a16959b1c07846638c8fcef5481..fe6ef0b1ff06bab4584ea5728820d1b2315a01e8 100644
--- a/net/http/http_server_properties_impl.h
+++ b/net/http/http_server_properties_impl.h
@@ -31,6 +31,9 @@ class NET_EXPORT HttpServerPropertiesImpl
: public HttpServerProperties,
NON_EXPORTED_BASE(public base::NonThreadSafe) {
public:
+ typedef base::MRUCache<
+ HostPortPair, PortAlternateProtocolPair> CachedAlternateProtocolMap;
+
HttpServerPropertiesImpl();
virtual ~HttpServerPropertiesImpl();
@@ -104,7 +107,7 @@ class NET_EXPORT HttpServerPropertiesImpl
virtual void SetBrokenAlternateProtocol(const HostPortPair& server) OVERRIDE;
// Returns all Alternate-Protocol mappings.
- virtual const AlternateProtocolMap& alternate_protocol_map() const OVERRIDE;
+ virtual AlternateProtocolMap GetAlternateProtocolMap() const OVERRIDE;
// Gets a reference to the SettingsMap stored for a host.
// If no settings are stored, returns an empty SettingsMap.
@@ -159,7 +162,7 @@ class NET_EXPORT HttpServerPropertiesImpl
SpdyServerHostPortTable spdy_servers_table_;
- AlternateProtocolMap alternate_protocol_map_;
+ scoped_ptr<CachedAlternateProtocolMap> alternate_protocol_map_;
Ryan Hamilton 2014/03/05 00:19:20 Is the idea here that the actual map we're keeping
ramant (doing other things) 2014/03/05 15:11:11 Used the MRUCache for AlternateProtocolMap. Will
SpdySettingsMap spdy_settings_map_;
ServerNetworkStatsMap server_network_stats_map_;
scoped_ptr<CachedPipelineCapabilityMap> pipeline_capability_map_;

Powered by Google App Engine
This is Rietveld 408576698