| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 } | 199 } |
| 200 | 200 |
| 201 base::TimeDelta srtt; | 201 base::TimeDelta srtt; |
| 202 QuicBandwidth bandwidth_estimate; | 202 QuicBandwidth bandwidth_estimate; |
| 203 }; | 203 }; |
| 204 | 204 |
| 205 typedef std::vector<AlternativeService> AlternativeServiceVector; | 205 typedef std::vector<AlternativeService> AlternativeServiceVector; |
| 206 typedef std::vector<AlternativeServiceInfo> AlternativeServiceInfoVector; | 206 typedef std::vector<AlternativeServiceInfo> AlternativeServiceInfoVector; |
| 207 typedef base::MRUCache<HostPortPair, AlternativeServiceInfoVector> | 207 typedef base::MRUCache<HostPortPair, AlternativeServiceInfoVector> |
| 208 AlternativeServiceMap; | 208 AlternativeServiceMap; |
| 209 typedef base::MRUCache<HostPortPair, SettingsMap> SpdySettingsMap; | 209 typedef base::MRUCache<url::SchemeHostPort, SettingsMap> SpdySettingsMap; |
| 210 typedef base::MRUCache<HostPortPair, ServerNetworkStats> ServerNetworkStatsMap; | 210 typedef base::MRUCache<HostPortPair, ServerNetworkStats> ServerNetworkStatsMap; |
| 211 typedef base::MRUCache<QuicServerId, std::string> QuicServerInfoMap; | 211 typedef base::MRUCache<QuicServerId, std::string> QuicServerInfoMap; |
| 212 | 212 |
| 213 // Persist 5 QUIC Servers. This is mainly used by cronet. | 213 // Persist 5 QUIC Servers. This is mainly used by cronet. |
| 214 const int kMaxQuicServersToPersist = 5; | 214 const int kMaxQuicServersToPersist = 5; |
| 215 | 215 |
| 216 extern const char kAlternateProtocolHeader[]; | 216 extern const char kAlternateProtocolHeader[]; |
| 217 extern const char kAlternativeServiceHeader[]; | 217 extern const char kAlternativeServiceHeader[]; |
| 218 | 218 |
| 219 // The interface for setting/retrieving the HTTP server properties. | 219 // The interface for setting/retrieving the HTTP server properties. |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 // Returned alternative services may have empty hostnames. | 315 // Returned alternative services may have empty hostnames. |
| 316 virtual const AlternativeServiceMap& alternative_service_map() const = 0; | 316 virtual const AlternativeServiceMap& alternative_service_map() const = 0; |
| 317 | 317 |
| 318 // Returns all alternative service mappings as human readable strings. | 318 // Returns all alternative service mappings as human readable strings. |
| 319 // Empty alternative service hostnames will be printed as such. | 319 // Empty alternative service hostnames will be printed as such. |
| 320 virtual scoped_ptr<base::Value> GetAlternativeServiceInfoAsValue() const = 0; | 320 virtual scoped_ptr<base::Value> GetAlternativeServiceInfoAsValue() const = 0; |
| 321 | 321 |
| 322 // Gets a reference to the SettingsMap stored for a host. | 322 // Gets a reference to the SettingsMap stored for a host. |
| 323 // If no settings are stored, returns an empty SettingsMap. | 323 // If no settings are stored, returns an empty SettingsMap. |
| 324 virtual const SettingsMap& GetSpdySettings( | 324 virtual const SettingsMap& GetSpdySettings( |
| 325 const HostPortPair& host_port_pair) = 0; | 325 const url::SchemeHostPort& server) = 0; |
| 326 | 326 |
| 327 // Saves an individual SPDY setting for a host. Returns true if SPDY setting | 327 // Saves an individual SPDY setting for a host. Returns true if SPDY setting |
| 328 // is to be persisted. | 328 // is to be persisted. |
| 329 virtual bool SetSpdySetting(const HostPortPair& host_port_pair, | 329 virtual bool SetSpdySetting(const url::SchemeHostPort& server, |
| 330 SpdySettingsIds id, | 330 SpdySettingsIds id, |
| 331 SpdySettingsFlags flags, | 331 SpdySettingsFlags flags, |
| 332 uint32_t value) = 0; | 332 uint32_t value) = 0; |
| 333 | 333 |
| 334 // Clears all SPDY settings for a host. | 334 // Clears all SPDY settings for a host. |
| 335 virtual void ClearSpdySettings(const HostPortPair& host_port_pair) = 0; | 335 virtual void ClearSpdySettings(const url::SchemeHostPort& server) = 0; |
| 336 | 336 |
| 337 // Clears all SPDY settings for all hosts. | 337 // Clears all SPDY settings for all hosts. |
| 338 virtual void ClearAllSpdySettings() = 0; | 338 virtual void ClearAllSpdySettings() = 0; |
| 339 | 339 |
| 340 // Returns all persistent SPDY settings. | 340 // Returns all persistent SPDY settings. |
| 341 virtual const SpdySettingsMap& spdy_settings_map() const = 0; | 341 virtual const SpdySettingsMap& spdy_settings_map() const = 0; |
| 342 | 342 |
| 343 virtual bool GetSupportsQuic(IPAddress* last_address) const = 0; | 343 virtual bool GetSupportsQuic(IPAddress* last_address) const = 0; |
| 344 | 344 |
| 345 virtual void SetSupportsQuic(bool used_quic, | 345 virtual void SetSupportsQuic(bool used_quic, |
| (...skipping 27 matching lines...) Expand all Loading... |
| 373 virtual void SetMaxServerConfigsStoredInProperties( | 373 virtual void SetMaxServerConfigsStoredInProperties( |
| 374 size_t max_server_configs_stored_in_properties) = 0; | 374 size_t max_server_configs_stored_in_properties) = 0; |
| 375 | 375 |
| 376 private: | 376 private: |
| 377 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); | 377 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); |
| 378 }; | 378 }; |
| 379 | 379 |
| 380 } // namespace net | 380 } // namespace net |
| 381 | 381 |
| 382 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_ | 382 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_ |
| OLD | NEW |