diff options
author | mbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-09 16:12:03 +0000 |
---|---|---|
committer | mbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-09 16:12:03 +0000 |
commit | 0ac338051b72a1e3717bcf8a54270cfeb50f1d13 (patch) | |
tree | e860fd6b2f50fb1b2e96081fae4f6600671bf5fb /net/spdy/spdy_settings_storage.h | |
parent | 7ca5cde25380c8dc47b5ac322e2893df875a4643 (diff) | |
download | chromium_src-0ac338051b72a1e3717bcf8a54270cfeb50f1d13.zip chromium_src-0ac338051b72a1e3717bcf8a54270cfeb50f1d13.tar.gz chromium_src-0ac338051b72a1e3717bcf8a54270cfeb50f1d13.tar.bz2 |
Add support for the SPDY session frame.
BUG=34749
TEST=SpdyNetworkTransactionTest.SettingsSaved, SettingsPlayback
Review URL: http://codereview.chromium.org/1595013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44092 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_settings_storage.h')
-rw-r--r-- | net/spdy/spdy_settings_storage.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/net/spdy/spdy_settings_storage.h b/net/spdy/spdy_settings_storage.h new file mode 100644 index 0000000..79f3b970 --- /dev/null +++ b/net/spdy/spdy_settings_storage.h @@ -0,0 +1,39 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef NET_SPDY_SPDY_SETTING_STORAGE_H_ +#define NET_SPDY_SPDY_SETTING_STORAGE_H_ + +#include <map> +#include "base/basictypes.h" +#include "net/base/host_port_pair.h" +#include "net/spdy/spdy_framer.h" + +namespace net { + +// SpdySettingsStorage stores SpdySettings which have been transmitted between +// endpoints for the SPDY SETTINGS frame. +class SpdySettingsStorage { + public: + SpdySettingsStorage(); + + // Get a copy of the SpdySettings stored for a host. + // If no settings are stored, returns an empty set of settings. + const spdy::SpdySettings& Get(const HostPortPair& host_port_pair) const; + + // Save settings for a host. + void Set(const HostPortPair& host_port_pair, + const spdy::SpdySettings& settings); + + private: + typedef std::map<HostPortPair, spdy::SpdySettings> SettingsMap; + + SettingsMap settings_map_; + + DISALLOW_COPY_AND_ASSIGN(SpdySettingsStorage); +}; + +} // namespace net + +#endif // NET_SPDY_SPDY_SETTING_STORAGE_H_ |