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

Unified Diff: net/http/http_server_properties.h

Issue 180743026: Relanding 255326 "HttpServerProperties - Implement MRU for AlternateProtocolMap. Persist" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use Erase to fix compilation error Created 6 years, 9 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_network_transaction_unittest.cc ('k') | net/http/http_server_properties_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_server_properties.h
diff --git a/net/http/http_server_properties.h b/net/http/http_server_properties.h
index ee788b43b5789aa6b6b7a9b365274f23a7f66ef3..3524dbdaa0e3e1318abf44e6cdc3fc5b75a63d33 100644
--- a/net/http/http_server_properties.h
+++ b/net/http/http_server_properties.h
@@ -8,6 +8,7 @@
#include <map>
#include <string>
#include "base/basictypes.h"
+#include "base/containers/mru_cache.h"
#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
#include "net/base/host_port_pair.h"
@@ -62,7 +63,8 @@ struct NET_EXPORT PortAlternateProtocolPair {
AlternateProtocol protocol;
};
-typedef std::map<HostPortPair, PortAlternateProtocolPair> AlternateProtocolMap;
+typedef base::MRUCache<
+ HostPortPair, PortAlternateProtocolPair> AlternateProtocolMap;
typedef std::map<HostPortPair, SettingsMap> SpdySettingsMap;
typedef std::map<HostPortPair,
HttpPipelinedHostCapability> PipelineCapabilityMap;
@@ -99,12 +101,12 @@ class NET_EXPORT HttpServerProperties {
bool support_spdy) = 0;
// Returns true if |server| has an Alternate-Protocol header.
- virtual bool HasAlternateProtocol(const HostPortPair& server) const = 0;
+ virtual bool HasAlternateProtocol(const HostPortPair& server) = 0;
// Returns the Alternate-Protocol and port for |server|.
// HasAlternateProtocol(server) must be true.
virtual PortAlternateProtocolPair GetAlternateProtocol(
- const HostPortPair& server) const = 0;
+ const HostPortPair& server) = 0;
// Sets the Alternate-Protocol for |server|.
virtual void SetAlternateProtocol(const HostPortPair& server,
« no previous file with comments | « net/http/http_network_transaction_unittest.cc ('k') | net/http/http_server_properties_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698