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

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

Issue 7529043: Rename NET_API to NET_EXPORT, and rename NET_TEST to NET_EXPORT_PRIVATE. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/base/net_api.h" 12 #include "net/base/net_export.h"
13 #include "net/spdy/spdy_framer.h" 13 #include "net/spdy/spdy_framer.h"
14 14
15 namespace net { 15 namespace net {
16 16
17 // SpdySettingsStorage stores SpdySettings which have been transmitted between 17 // SpdySettingsStorage stores SpdySettings which have been transmitted between
18 // endpoints for the SPDY SETTINGS frame. 18 // endpoints for the SPDY SETTINGS frame.
19 class NET_TEST SpdySettingsStorage { 19 class NET_EXPORT_PRIVATE SpdySettingsStorage {
20 public: 20 public:
21 SpdySettingsStorage(); 21 SpdySettingsStorage();
22 ~SpdySettingsStorage(); 22 ~SpdySettingsStorage();
23 23
24 // Gets a copy of the SpdySettings stored for a host. 24 // Gets a copy of the SpdySettings stored for a host.
25 // If no settings are stored, returns an empty set of settings. 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 26 // NOTE: Since settings_map_ may be cleared, don't store the address of the
27 // return value. 27 // return value.
28 const spdy::SpdySettings& Get(const HostPortPair& host_port_pair) const; 28 const spdy::SpdySettings& Get(const HostPortPair& host_port_pair) const;
29 29
30 // Saves settings for a host. 30 // Saves settings for a host.
31 void Set(const HostPortPair& host_port_pair, 31 void Set(const HostPortPair& host_port_pair,
32 const spdy::SpdySettings& settings); 32 const spdy::SpdySettings& settings);
33 33
34 // Clears out the settings_map_ object. 34 // Clears out the settings_map_ object.
35 void Clear(); 35 void Clear();
36 36
37 private: 37 private:
38 typedef std::map<HostPortPair, spdy::SpdySettings> SettingsMap; 38 typedef std::map<HostPortPair, spdy::SpdySettings> SettingsMap;
39 39
40 SettingsMap settings_map_; 40 SettingsMap settings_map_;
41 41
42 DISALLOW_COPY_AND_ASSIGN(SpdySettingsStorage); 42 DISALLOW_COPY_AND_ASSIGN(SpdySettingsStorage);
43 }; 43 };
44 44
45 } // namespace net 45 } // namespace net
46 46
47 #endif // NET_SPDY_SPDY_SETTING_STORAGE_H_ 47 #endif // NET_SPDY_SPDY_SETTING_STORAGE_H_
48 48
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698