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

Side by Side Diff: net/http/http_server_properties.h

Issue 9802003: SPDY - persist SPDY settings. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 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/base/net_log_event_type_list.h ('k') | net/http/http_server_properties_impl.h » ('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) 2012 The Chromium Authors. All rights reserved. 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 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_HTTP_HTTP_SERVER_PROPERTIES_H_ 5 #ifndef NET_HTTP_HTTP_SERVER_PROPERTIES_H_
6 #define NET_HTTP_HTTP_SERVER_PROPERTIES_H_ 6 #define NET_HTTP_HTTP_SERVER_PROPERTIES_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 19 matching lines...) Expand all
30 return port == other.port && protocol == other.protocol; 30 return port == other.port && protocol == other.protocol;
31 } 31 }
32 32
33 std::string ToString() const; 33 std::string ToString() const;
34 34
35 uint16 port; 35 uint16 port;
36 AlternateProtocol protocol; 36 AlternateProtocol protocol;
37 }; 37 };
38 38
39 typedef std::map<HostPortPair, PortAlternateProtocolPair> AlternateProtocolMap; 39 typedef std::map<HostPortPair, PortAlternateProtocolPair> AlternateProtocolMap;
40 typedef std::map<HostPortPair, SpdySettings> SpdySettingsMap; 40 typedef std::map<HostPortPair, SettingsMap> SpdySettingsMap;
41 typedef std::map<HostPortPair, 41 typedef std::map<HostPortPair,
42 HttpPipelinedHostCapability> PipelineCapabilityMap; 42 HttpPipelinedHostCapability> PipelineCapabilityMap;
43 43
44 extern const char kAlternateProtocolHeader[]; 44 extern const char kAlternateProtocolHeader[];
45 extern const char* const kAlternateProtocolStrings[NUM_ALTERNATE_PROTOCOLS]; 45 extern const char* const kAlternateProtocolStrings[NUM_ALTERNATE_PROTOCOLS];
46 46
47 // The interface for setting/retrieving the HTTP server properties. 47 // The interface for setting/retrieving the HTTP server properties.
48 // Currently, this class manages servers': 48 // Currently, this class manages servers':
49 // * SPDY support (based on NPN results) 49 // * SPDY support (based on NPN results)
50 // * Alternate-Protocol support 50 // * Alternate-Protocol support
(...skipping 26 matching lines...) Expand all
77 virtual void SetAlternateProtocol(const HostPortPair& server, 77 virtual void SetAlternateProtocol(const HostPortPair& server,
78 uint16 alternate_port, 78 uint16 alternate_port,
79 AlternateProtocol alternate_protocol) = 0; 79 AlternateProtocol alternate_protocol) = 0;
80 80
81 // Sets the Alternate-Protocol for |server| to be BROKEN. 81 // Sets the Alternate-Protocol for |server| to be BROKEN.
82 virtual void SetBrokenAlternateProtocol(const HostPortPair& server) = 0; 82 virtual void SetBrokenAlternateProtocol(const HostPortPair& server) = 0;
83 83
84 // Returns all Alternate-Protocol mappings. 84 // Returns all Alternate-Protocol mappings.
85 virtual const AlternateProtocolMap& alternate_protocol_map() const = 0; 85 virtual const AlternateProtocolMap& alternate_protocol_map() const = 0;
86 86
87 // Gets a reference to the SpdySettings stored for a host. 87 // Gets a reference to the SettingsMap stored for a host.
88 // If no settings are stored, returns an empty set of settings. 88 // If no settings are stored, returns an empty SettingsMap.
89 virtual const SpdySettings& GetSpdySettings( 89 virtual const SettingsMap& GetSpdySettings(
90 const HostPortPair& host_port_pair) const = 0; 90 const HostPortPair& host_port_pair) const = 0;
91 91
92 // Saves settings for a host. Returns true if SpdySettings are to be 92 // Saves an individual SPDY setting for a host. Returns true if SPDY setting
93 // persisted. Used by unittests only. 93 // is to be persisted.
94 // TODO(rtenneti): Move this method to test utility file. 94 virtual bool SetSpdySetting(const HostPortPair& host_port_pair,
95 virtual bool SetSpdySettings(const HostPortPair& host_port_pair, 95 SpdySettingsIds id,
96 const SpdySettings& settings) = 0; 96 SpdySettingsFlags flags,
97 uint32 value) = 0;
97 98
98 // Saves an individual setting for a host. Returns true if SpdySetting is to 99 // Clears all SPDY settings.
99 // be persisted.
100 virtual bool SetSpdySetting(const HostPortPair& host_port_pair,
101 const SpdySetting& setting) = 0;
102
103 // Clears all spdy_settings.
104 virtual void ClearSpdySettings() = 0; 100 virtual void ClearSpdySettings() = 0;
105 101
106 // Returns all persistent SpdySettings. 102 // Returns all persistent SPDY settings.
107 virtual const SpdySettingsMap& spdy_settings_map() const = 0; 103 virtual const SpdySettingsMap& spdy_settings_map() const = 0;
108 104
109 virtual HttpPipelinedHostCapability GetPipelineCapability( 105 virtual HttpPipelinedHostCapability GetPipelineCapability(
110 const HostPortPair& origin) = 0; 106 const HostPortPair& origin) = 0;
111 107
112 virtual void SetPipelineCapability( 108 virtual void SetPipelineCapability(
113 const HostPortPair& origin, 109 const HostPortPair& origin,
114 HttpPipelinedHostCapability capability) = 0; 110 HttpPipelinedHostCapability capability) = 0;
115 111
116 virtual void ClearPipelineCapabilities() = 0; 112 virtual void ClearPipelineCapabilities() = 0;
117 113
118 virtual PipelineCapabilityMap GetPipelineCapabilityMap() const = 0; 114 virtual PipelineCapabilityMap GetPipelineCapabilityMap() const = 0;
119 115
120 private: 116 private:
121 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); 117 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties);
122 }; 118 };
123 119
124 } // namespace net 120 } // namespace net
125 121
126 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_ 122 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_
OLDNEW
« no previous file with comments | « net/base/net_log_event_type_list.h ('k') | net/http/http_server_properties_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698