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

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

Issue 9618002: SPDY - integration of spdy/3 code. (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
OLDNEW
1 // Copyright (c) 2011 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"
11 #include "net/base/host_port_pair.h" 11 #include "net/base/host_port_pair.h"
12 #include "net/base/net_export.h" 12 #include "net/base/net_export.h"
13 #include "net/http/http_pipelined_host_capability.h" 13 #include "net/http/http_pipelined_host_capability.h"
14 #include "net/spdy/spdy_framer.h" // TODO(willchan): Reconsider this. 14 #include "net/spdy/spdy_framer.h" // TODO(willchan): Reconsider this.
15 15
16 namespace net { 16 namespace net {
17 17
18 enum AlternateProtocol { 18 enum AlternateProtocol {
19 NPN_SPDY_1 = 0, 19 NPN_SPDY_1 = 0,
20 NPN_SPDY_2, 20 NPN_SPDY_2,
21 NPN_SPDY_21, 21 NPN_SPDY_21,
22 NPN_SPDY_3,
22 NUM_ALTERNATE_PROTOCOLS, 23 NUM_ALTERNATE_PROTOCOLS,
23 ALTERNATE_PROTOCOL_BROKEN, // The alternate protocol is known to be broken. 24 ALTERNATE_PROTOCOL_BROKEN, // The alternate protocol is known to be broken.
24 UNINITIALIZED_ALTERNATE_PROTOCOL, 25 UNINITIALIZED_ALTERNATE_PROTOCOL,
25 }; 26 };
26 27
27 struct NET_EXPORT PortAlternateProtocolPair { 28 struct NET_EXPORT PortAlternateProtocolPair {
28 bool Equals(const PortAlternateProtocolPair& other) const { 29 bool Equals(const PortAlternateProtocolPair& other) const {
29 return port == other.port && protocol == other.protocol; 30 return port == other.port && protocol == other.protocol;
30 } 31 }
31 32
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 83
83 // Returns all Alternate-Protocol mappings. 84 // Returns all Alternate-Protocol mappings.
84 virtual const AlternateProtocolMap& alternate_protocol_map() const = 0; 85 virtual const AlternateProtocolMap& alternate_protocol_map() const = 0;
85 86
86 // Gets a reference to the SpdySettings stored for a host. 87 // Gets a reference to the SpdySettings stored for a host.
87 // If no settings are stored, returns an empty set of settings. 88 // If no settings are stored, returns an empty set of settings.
88 virtual const spdy::SpdySettings& GetSpdySettings( 89 virtual const spdy::SpdySettings& GetSpdySettings(
89 const HostPortPair& host_port_pair) const = 0; 90 const HostPortPair& host_port_pair) const = 0;
90 91
91 // Saves settings for a host. Returns true if SpdySettings are to be 92 // Saves settings for a host. Returns true if SpdySettings are to be
92 // persisted. 93 // persisted. Used by unittests only.
94 // TODO(rtenneti): Move this method to test utility file.
93 virtual bool SetSpdySettings(const HostPortPair& host_port_pair, 95 virtual bool SetSpdySettings(const HostPortPair& host_port_pair,
94 const spdy::SpdySettings& settings) = 0; 96 const spdy::SpdySettings& settings) = 0;
95 97
98 // Saves an individual setting for a host. Returns true if SpdySetting is to
99 // be persisted.
100 virtual bool SetSpdySetting(const HostPortPair& host_port_pair,
101 const spdy::SpdySetting& setting) = 0;
102
96 // Clears all spdy_settings. 103 // Clears all spdy_settings.
97 virtual void ClearSpdySettings() = 0; 104 virtual void ClearSpdySettings() = 0;
98 105
99 // Returns all persistent SpdySettings. 106 // Returns all persistent SpdySettings.
100 virtual const SpdySettingsMap& spdy_settings_map() const = 0; 107 virtual const SpdySettingsMap& spdy_settings_map() const = 0;
101 108
102 virtual HttpPipelinedHostCapability GetPipelineCapability( 109 virtual HttpPipelinedHostCapability GetPipelineCapability(
103 const HostPortPair& origin) = 0; 110 const HostPortPair& origin) = 0;
104 111
105 virtual void SetPipelineCapability( 112 virtual void SetPipelineCapability(
106 const HostPortPair& origin, 113 const HostPortPair& origin,
107 HttpPipelinedHostCapability capability) = 0; 114 HttpPipelinedHostCapability capability) = 0;
108 115
109 virtual void ClearPipelineCapabilities() = 0; 116 virtual void ClearPipelineCapabilities() = 0;
110 117
111 virtual PipelineCapabilityMap GetPipelineCapabilityMap() const = 0; 118 virtual PipelineCapabilityMap GetPipelineCapabilityMap() const = 0;
112 119
113 private: 120 private:
114 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); 121 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties);
115 }; 122 };
116 123
117 } // namespace net 124 } // namespace net
118 125
119 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_ 126 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_
OLDNEW
« no previous file with comments | « net/http/http_proxy_client_socket_pool_spdy3_unittest.cc ('k') | net/http/http_server_properties.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698