diff options
author | mbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-09 20:18:50 +0000 |
---|---|---|
committer | mbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-09 20:18:50 +0000 |
commit | 74188f235dd5b4f8e80ca30d6e3a4d4c3061d84d (patch) | |
tree | b27e432a39963d7738c1464001158d2b905c6fc4 /net/spdy/spdy_settings_storage.h | |
parent | 6c86698860a88d07b21da6efdaf41ceb8273ccb1 (diff) | |
download | chromium_src-74188f235dd5b4f8e80ca30d6e3a4d4c3061d84d.zip chromium_src-74188f235dd5b4f8e80ca30d6e3a4d4c3061d84d.tar.gz chromium_src-74188f235dd5b4f8e80ca30d6e3a4d4c3061d84d.tar.bz2 |
Take 2 at landing the SPDY SETTINGS frame patch.
BUG=34749
TEST=SpdyNetworkTransactionTest.Setting*
Review URL: http://codereview.chromium.org/1547028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44118 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_settings_storage.h')
-rw-r--r-- | net/spdy/spdy_settings_storage.h | 40 |
1 files changed, 40 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..93b44dc --- /dev/null +++ b/net/spdy/spdy_settings_storage.h @@ -0,0 +1,40 @@ +// 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_ + |