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

Unified Diff: net/http/http_server_properties.h

Issue 8423028: Persist dynamically learned SPDY settings (like CWND). (Closed) Base URL: svn://chrome-svn/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
« no previous file with comments | « net/http/http_network_session.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
===================================================================
--- net/http/http_server_properties.h (revision 110097)
+++ net/http/http_server_properties.h (working copy)
@@ -10,6 +10,7 @@
#include "base/basictypes.h"
#include "net/base/host_port_pair.h"
#include "net/base/net_export.h"
+#include "net/spdy/spdy_framer.h" // TODO(willchan): Reconsider this.
namespace net {
@@ -33,6 +34,7 @@
};
typedef std::map<HostPortPair, PortAlternateProtocolPair> AlternateProtocolMap;
+typedef std::map<HostPortPair, spdy::SpdySettings> SpdySettingsMap;
extern const char kAlternateProtocolHeader[];
extern const char* const kAlternateProtocolStrings[NUM_ALTERNATE_PROTOCOLS];
@@ -41,6 +43,7 @@
// Currently, this class manages servers':
// * SPDY support (based on NPN results)
// * Alternate-Protocol support
+// * Spdy Settings (like CWND ID field)
class NET_EXPORT HttpServerProperties {
public:
HttpServerProperties() {}
@@ -76,6 +79,22 @@
// Returns all Alternate-Protocol mappings.
virtual const AlternateProtocolMap& alternate_protocol_map() const = 0;
+ // Gets a reference to the SpdySettings stored for a host.
+ // If no settings are stored, returns an empty set of settings.
+ virtual const spdy::SpdySettings& GetSpdySettings(
+ const HostPortPair& host_port_pair) const = 0;
+
+ // Saves settings for a host. Returns true if SpdySettings are to be
+ // persisted.
+ virtual bool SetSpdySettings(const HostPortPair& host_port_pair,
+ const spdy::SpdySettings& settings) = 0;
+
+ // Clears all spdy_settings.
+ virtual void ClearSpdySettings() = 0;
+
+ // Returns all persistent SpdySettings.
+ virtual const SpdySettingsMap& spdy_settings_map() const = 0;
+
private:
DISALLOW_COPY_AND_ASSIGN(HttpServerProperties);
};
« no previous file with comments | « net/http/http_network_session.cc ('k') | net/http/http_server_properties_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698