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

Unified Diff: net/http/http_server_properties_impl.h

Issue 8770035: Save pipelining capabilities for the most used hosts between sessions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 f697848e0ff32a12eab8eca035ec287067689aac..bf2cc2571c3936d264f5eacc2fedfb4f5b246f87 100644
--- a/net/http/http_server_properties_impl.h
+++ b/net/http/http_server_properties_impl.h
@@ -12,6 +12,7 @@
#include "base/basictypes.h"
#include "base/gtest_prod_util.h"
#include "base/hash_tables.h"
+#include "base/memory/mru_cache.h"
#include "base/threading/non_thread_safe.h"
#include "base/values.h"
#include "net/base/host_port_pair.h"
@@ -42,6 +43,9 @@ class NET_EXPORT HttpServerPropertiesImpl
void InitializeSpdySettingsServers(SpdySettingsMap* spdy_settings_map);
+ void InitializePipelineCapabilities(
mmenke 2011/12/02 21:52:10 Might be nice to have a comment to make clear that
James Simonsen 2011/12/03 03:16:00 Done.
+ PipelineCapabilityMap* pipeline_capability_map);
mmenke 2011/12/02 21:52:10 Think you can make this argument const.
James Simonsen 2011/12/03 03:16:00 Done.
+
// Get the list of servers (host/port) that support SPDY.
void GetSpdyServerList(base::ListValue* spdy_server_list) const;
@@ -106,7 +110,20 @@ class NET_EXPORT HttpServerPropertiesImpl
// Returns all persistent SpdySettings.
virtual const SpdySettingsMap& spdy_settings_map() const OVERRIDE;
+ virtual HttpPipelinedHost::Capability GetPipelineCapability(
+ const HostPortPair& origin) OVERRIDE;
+
+ virtual void SetPipelineCapability(
+ const HostPortPair& origin,
+ HttpPipelinedHost::Capability capability) OVERRIDE;
+
+ virtual void ClearPipelineCapabilities() OVERRIDE;
+
+ virtual PipelineCapabilityMap GetPipelineCapabilityMap() const OVERRIDE;
+
private:
+ typedef base::MRUCache<
+ HostPortPair, HttpPipelinedHost::Capability> 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;
@@ -114,6 +131,7 @@ class NET_EXPORT HttpServerPropertiesImpl
AlternateProtocolMap alternate_protocol_map_;
SpdySettingsMap spdy_settings_map_;
+ CachedPipelineCapabilityMap pipeline_capability_map_;
DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesImpl);
};

Powered by Google App Engine
This is Rietveld 408576698