OLD | NEW |
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 CHROME_BROWSER_NET_HTTP_SERVER_PROPERTIES_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_NET_HTTP_SERVER_PROPERTIES_MANAGER_H_ |
6 #define CHROME_BROWSER_NET_HTTP_SERVER_PROPERTIES_MANAGER_H_ | 6 #define CHROME_BROWSER_NET_HTTP_SERVER_PROPERTIES_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 // Add |server| as the SPDY server which supports SPDY protocol into the | 93 // Add |server| as the SPDY server which supports SPDY protocol into the |
94 // persisitent store. Should only be called from IO thread. | 94 // persisitent store. Should only be called from IO thread. |
95 virtual void SetSupportsSpdy(const net::HostPortPair& server, | 95 virtual void SetSupportsSpdy(const net::HostPortPair& server, |
96 bool support_spdy) OVERRIDE; | 96 bool support_spdy) OVERRIDE; |
97 | 97 |
98 // Returns true if |server| has an Alternate-Protocol header. | 98 // Returns true if |server| has an Alternate-Protocol header. |
99 virtual bool HasAlternateProtocol(const net::HostPortPair& server) OVERRIDE; | 99 virtual bool HasAlternateProtocol(const net::HostPortPair& server) OVERRIDE; |
100 | 100 |
101 // Returns the Alternate-Protocol and port for |server|. | 101 // Returns the Alternate-Protocol and port for |server|. |
102 // HasAlternateProtocol(server) must be true. | 102 // HasAlternateProtocol(server) must be true. |
103 virtual net::AlternateProtocolInfo GetAlternateProtocol( | 103 virtual net::PortAlternateProtocolPair GetAlternateProtocol( |
104 const net::HostPortPair& server) OVERRIDE; | 104 const net::HostPortPair& server) OVERRIDE; |
105 | 105 |
106 // Sets the Alternate-Protocol for |server|. | 106 // Sets the Alternate-Protocol for |server|. |
107 virtual void SetAlternateProtocol( | 107 virtual void SetAlternateProtocol( |
108 const net::HostPortPair& server, | 108 const net::HostPortPair& server, |
109 uint16 alternate_port, | 109 uint16 alternate_port, |
110 net::AlternateProtocol alternate_protocol, | 110 net::AlternateProtocol alternate_protocol) OVERRIDE; |
111 double alternate_probability) OVERRIDE; | |
112 | 111 |
113 // Sets the Alternate-Protocol for |server| to be BROKEN. | 112 // Sets the Alternate-Protocol for |server| to be BROKEN. |
114 virtual void SetBrokenAlternateProtocol( | 113 virtual void SetBrokenAlternateProtocol( |
115 const net::HostPortPair& server) OVERRIDE; | 114 const net::HostPortPair& server) OVERRIDE; |
116 | 115 |
117 // Returns true if Alternate-Protocol for |server| was recently BROKEN. | 116 // Returns true if Alternate-Protocol for |server| was recently BROKEN. |
118 virtual bool WasAlternateProtocolRecentlyBroken( | 117 virtual bool WasAlternateProtocolRecentlyBroken( |
119 const net::HostPortPair& server) OVERRIDE; | 118 const net::HostPortPair& server) OVERRIDE; |
120 | 119 |
121 // Confirms that Alternate-Protocol for |server| is working. | 120 // Confirms that Alternate-Protocol for |server| is working. |
122 virtual void ConfirmAlternateProtocol( | 121 virtual void ConfirmAlternateProtocol( |
123 const net::HostPortPair& server) OVERRIDE; | 122 const net::HostPortPair& server) OVERRIDE; |
124 | 123 |
125 // Clears the Alternate-Protocol for |server|. | 124 // Clears the Alternate-Protocol for |server|. |
126 virtual void ClearAlternateProtocol(const net::HostPortPair& server) OVERRIDE; | 125 virtual void ClearAlternateProtocol(const net::HostPortPair& server) OVERRIDE; |
127 | 126 |
128 // Returns all Alternate-Protocol mappings. | 127 // Returns all Alternate-Protocol mappings. |
129 virtual const net::AlternateProtocolMap& | 128 virtual const net::AlternateProtocolMap& |
130 alternate_protocol_map() const OVERRIDE; | 129 alternate_protocol_map() const OVERRIDE; |
131 | 130 |
132 virtual void SetAlternateProtocolExperiment( | 131 virtual void SetAlternateProtocolExperiment( |
133 net::AlternateProtocolExperiment experiment) OVERRIDE; | 132 net::AlternateProtocolExperiment experiment) OVERRIDE; |
134 | 133 |
135 virtual void SetAlternateProtocolProbabilityThreshold( | |
136 double threshold) OVERRIDE; | |
137 | |
138 virtual net::AlternateProtocolExperiment GetAlternateProtocolExperiment() | 134 virtual net::AlternateProtocolExperiment GetAlternateProtocolExperiment() |
139 const OVERRIDE; | 135 const OVERRIDE; |
140 | 136 |
141 // Gets a reference to the SettingsMap stored for a host. | 137 // Gets a reference to the SettingsMap stored for a host. |
142 // If no settings are stored, returns an empty SettingsMap. | 138 // If no settings are stored, returns an empty SettingsMap. |
143 virtual const net::SettingsMap& GetSpdySettings( | 139 virtual const net::SettingsMap& GetSpdySettings( |
144 const net::HostPortPair& host_port_pair) OVERRIDE; | 140 const net::HostPortPair& host_port_pair) OVERRIDE; |
145 | 141 |
146 // Saves an individual SPDY setting for a host. Returns true if SPDY setting | 142 // Saves an individual SPDY setting for a host. Returns true if SPDY setting |
147 // is to be persisted. | 143 // is to be persisted. |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 io_prefs_update_timer_; | 250 io_prefs_update_timer_; |
255 | 251 |
256 scoped_ptr<net::HttpServerPropertiesImpl> http_server_properties_impl_; | 252 scoped_ptr<net::HttpServerPropertiesImpl> http_server_properties_impl_; |
257 | 253 |
258 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesManager); | 254 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesManager); |
259 }; | 255 }; |
260 | 256 |
261 } // namespace chrome_browser_net | 257 } // namespace chrome_browser_net |
262 | 258 |
263 #endif // CHROME_BROWSER_NET_HTTP_SERVER_PROPERTIES_MANAGER_H_ | 259 #endif // CHROME_BROWSER_NET_HTTP_SERVER_PROPERTIES_MANAGER_H_ |
OLD | NEW |