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

Side by Side Diff: net/spdy/spdy_settings_storage.h

Issue 10054034: SPDY - replaced SpdySettings (list) with SettingsMap (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 8 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/spdy/spdy_session_spdy3_unittest.cc ('k') | net/spdy/spdy_settings_storage.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef NET_SPDY_SPDY_SETTING_STORAGE_H_
6 #define NET_SPDY_SPDY_SETTING_STORAGE_H_
7 #pragma once
8
9 #include <map>
10 #include "base/basictypes.h"
11 #include "net/base/host_port_pair.h"
12 #include "net/base/net_export.h"
13 #include "net/spdy/spdy_framer.h"
14
15 namespace net {
16
17 // SpdySettingsStorage stores SpdySettings which have been transmitted between
18 // endpoints for the SPDY SETTINGS frame.
19 class NET_EXPORT_PRIVATE SpdySettingsStorage {
20 public:
21 SpdySettingsStorage();
22 ~SpdySettingsStorage();
23
24 // Gets a copy of the SpdySettings stored for a host.
25 // If no settings are stored, returns an empty set of settings.
26 // NOTE: Since settings_map_ may be cleared, don't store the address of the
27 // return value.
28 const SpdySettings& Get(const HostPortPair& host_port_pair) const;
29
30 // Saves settings for a host.
31 void Set(const HostPortPair& host_port_pair,
32 const SpdySettings& settings);
33
34 // Clears out the settings_map_ object.
35 void Clear();
36
37 private:
38 typedef std::map<HostPortPair, SpdySettings> SettingsMap;
39
40 SettingsMap settings_map_;
41
42 DISALLOW_COPY_AND_ASSIGN(SpdySettingsStorage);
43 };
44
45 } // namespace net
46
47 #endif // NET_SPDY_SPDY_SETTING_STORAGE_H_
48
OLDNEW
« no previous file with comments | « net/spdy/spdy_session_spdy3_unittest.cc ('k') | net/spdy/spdy_settings_storage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698