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 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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 | 174 |
175 // Clears the Alternate-Protocol for |server|. | 175 // Clears the Alternate-Protocol for |server|. |
176 virtual void ClearAlternateProtocol(const HostPortPair& server) = 0; | 176 virtual void ClearAlternateProtocol(const HostPortPair& server) = 0; |
177 | 177 |
178 // Returns all Alternate-Protocol mappings. | 178 // Returns all Alternate-Protocol mappings. |
179 virtual const AlternateProtocolMap& alternate_protocol_map() const = 0; | 179 virtual const AlternateProtocolMap& alternate_protocol_map() const = 0; |
180 | 180 |
181 virtual void SetAlternateProtocolExperiment( | 181 virtual void SetAlternateProtocolExperiment( |
182 AlternateProtocolExperiment experiment) = 0; | 182 AlternateProtocolExperiment experiment) = 0; |
183 | 183 |
| 184 // Sets the threshold to be used when evaluating Alternate-Protocol |
| 185 // advertisments. Only advertisements with a with a probability |
| 186 // greater than |threshold| will be honored. |threshold| must be |
| 187 // between 0 and 1 inclusive. Hence, a threshold of 0 implies that |
| 188 // all advertisements will be honored. |
184 virtual void SetAlternateProtocolProbabilityThreshold( | 189 virtual void SetAlternateProtocolProbabilityThreshold( |
185 double threshold) = 0; | 190 double threshold) = 0; |
186 | 191 |
187 virtual AlternateProtocolExperiment GetAlternateProtocolExperiment() | 192 virtual AlternateProtocolExperiment GetAlternateProtocolExperiment() |
188 const = 0; | 193 const = 0; |
189 | 194 |
190 // Gets a reference to the SettingsMap stored for a host. | 195 // Gets a reference to the SettingsMap stored for a host. |
191 // If no settings are stored, returns an empty SettingsMap. | 196 // If no settings are stored, returns an empty SettingsMap. |
192 virtual const SettingsMap& GetSpdySettings( | 197 virtual const SettingsMap& GetSpdySettings( |
193 const HostPortPair& host_port_pair) = 0; | 198 const HostPortPair& host_port_pair) = 0; |
(...skipping 20 matching lines...) Expand all Loading... |
214 virtual const NetworkStats* GetServerNetworkStats( | 219 virtual const NetworkStats* GetServerNetworkStats( |
215 const HostPortPair& host_port_pair) const = 0; | 220 const HostPortPair& host_port_pair) const = 0; |
216 | 221 |
217 private: | 222 private: |
218 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); | 223 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); |
219 }; | 224 }; |
220 | 225 |
221 } // namespace net | 226 } // namespace net |
222 | 227 |
223 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_ | 228 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_ |
OLD | NEW |