diff options
author | rtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-24 14:12:48 +0000 |
---|---|---|
committer | rtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-24 14:12:48 +0000 |
commit | e0935cc22a6c10461b004b9f3c0b0f7f4d52c137 (patch) | |
tree | fb6e67b1a526192a0794d199ba9aa2846f38be05 /net/http/http_server_properties.h | |
parent | 5970f146cda0eefc2726a2eeb9bd8e16234e0df1 (diff) | |
download | chromium_src-e0935cc22a6c10461b004b9f3c0b0f7f4d52c137.zip chromium_src-e0935cc22a6c10461b004b9f3c0b0f7f4d52c137.tar.gz chromium_src-e0935cc22a6c10461b004b9f3c0b0f7f4d52c137.tar.bz2 |
SPDY - persist SPDY settings.
HttpServerProperties stores SPDY settings in SettingsMap
whose key is settings ID and value is a (flags, value)
pair (SettingsFlagsAndValue).
The format of the persisted data is same as before (restored
the old code that persisted the data). Verified it with an older
version of the Preferences file that is very large. Verified
that we have sent the right data (sorted and unique settings)
to the server and that duplicates were removed from the file.
Changed all the code above SpdyFramer to use the above
spdy::SettingsMap and spdy::SettingsFlagsAndValue
data structures.
When chrome sends Spdy Settings to the server, it uses
the current SpdyFramer's API calls to create Settings
frame.
TODO:
1) Delete spdy::SpdySettings and spdy::SpdySetting
and replace them with SettingsMap, SpdySettingsIds,
SpdySettingsFlags and value.
2) Add version to the persisted data.
BUG=117760
R=rch, willchan
TEST=network unit tests and browser unit tests.
Review URL: http://codereview.chromium.org/9802003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128737 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_server_properties.h')
-rw-r--r-- | net/http/http_server_properties.h | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/net/http/http_server_properties.h b/net/http/http_server_properties.h index ccadf2b..e61be5e 100644 --- a/net/http/http_server_properties.h +++ b/net/http/http_server_properties.h @@ -37,7 +37,7 @@ struct NET_EXPORT PortAlternateProtocolPair { }; typedef std::map<HostPortPair, PortAlternateProtocolPair> AlternateProtocolMap; -typedef std::map<HostPortPair, SpdySettings> SpdySettingsMap; +typedef std::map<HostPortPair, SettingsMap> SpdySettingsMap; typedef std::map<HostPortPair, HttpPipelinedHostCapability> PipelineCapabilityMap; @@ -84,26 +84,22 @@ class NET_EXPORT HttpServerProperties { // 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 SpdySettings& GetSpdySettings( + // Gets a reference to the SettingsMap stored for a host. + // If no settings are stored, returns an empty SettingsMap. + virtual const SettingsMap& GetSpdySettings( const HostPortPair& host_port_pair) const = 0; - // Saves settings for a host. Returns true if SpdySettings are to be - // persisted. Used by unittests only. - // TODO(rtenneti): Move this method to test utility file. - virtual bool SetSpdySettings(const HostPortPair& host_port_pair, - const SpdySettings& settings) = 0; - - // Saves an individual setting for a host. Returns true if SpdySetting is to - // be persisted. + // Saves an individual SPDY setting for a host. Returns true if SPDY setting + // is to be persisted. virtual bool SetSpdySetting(const HostPortPair& host_port_pair, - const SpdySetting& setting) = 0; + SpdySettingsIds id, + SpdySettingsFlags flags, + uint32 value) = 0; - // Clears all spdy_settings. + // Clears all SPDY settings. virtual void ClearSpdySettings() = 0; - // Returns all persistent SpdySettings. + // Returns all persistent SPDY settings. virtual const SpdySettingsMap& spdy_settings_map() const = 0; virtual HttpPipelinedHostCapability GetPipelineCapability( |