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

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

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

Powered by Google App Engine
This is Rietveld 408576698