| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 std::unique_ptr<base::Value> GetAlternativeServiceInfoAsValue() | 320 virtual std::unique_ptr<base::Value> GetAlternativeServiceInfoAsValue() |
| 321 const = 0; | 321 const = 0; |
| 322 | 322 |
| 323 // Gets a reference to the SettingsMap stored for a host. | 323 // Gets a reference to the SettingsMap stored for a host. |
| 324 // If no settings are stored, returns an empty SettingsMap. | 324 // If no settings are stored, returns an empty SettingsMap. |
| 325 virtual const SettingsMap& GetSpdySettings( | 325 virtual const SettingsMap& GetSpdySettings( |
| 326 const HostPortPair& host_port_pair) = 0; | 326 const url::SchemeHostPort& server) = 0; |
| 327 | 327 |
| 328 // Saves an individual SPDY setting for a host. Returns true if SPDY setting | 328 // Saves an individual SPDY setting for a host. Returns true if SPDY setting |
| 329 // is to be persisted. | 329 // is to be persisted. |
| 330 virtual bool SetSpdySetting(const HostPortPair& host_port_pair, | 330 virtual bool SetSpdySetting(const url::SchemeHostPort& server, |
| 331 SpdySettingsIds id, | 331 SpdySettingsIds id, |
| 332 SpdySettingsFlags flags, | 332 SpdySettingsFlags flags, |
| 333 uint32_t value) = 0; | 333 uint32_t value) = 0; |
| 334 | 334 |
| 335 // Clears all SPDY settings for a host. | 335 // Clears all SPDY settings for a host. |
| 336 virtual void ClearSpdySettings(const HostPortPair& host_port_pair) = 0; | 336 virtual void ClearSpdySettings(const url::SchemeHostPort& server) = 0; |
| 337 | 337 |
| 338 // Clears all SPDY settings for all hosts. | 338 // Clears all SPDY settings for all hosts. |
| 339 virtual void ClearAllSpdySettings() = 0; | 339 virtual void ClearAllSpdySettings() = 0; |
| 340 | 340 |
| 341 // Returns all persistent SPDY settings. | 341 // Returns all persistent SPDY settings. |
| 342 virtual const SpdySettingsMap& spdy_settings_map() const = 0; | 342 virtual const SpdySettingsMap& spdy_settings_map() const = 0; |
| 343 | 343 |
| 344 virtual bool GetSupportsQuic(IPAddress* last_address) const = 0; | 344 virtual bool GetSupportsQuic(IPAddress* last_address) const = 0; |
| 345 | 345 |
| 346 virtual void SetSupportsQuic(bool used_quic, | 346 virtual void SetSupportsQuic(bool used_quic, |
| (...skipping 27 matching lines...) Expand all Loading... |
| 374 virtual void SetMaxServerConfigsStoredInProperties( | 374 virtual void SetMaxServerConfigsStoredInProperties( |
| 375 size_t max_server_configs_stored_in_properties) = 0; | 375 size_t max_server_configs_stored_in_properties) = 0; |
| 376 | 376 |
| 377 private: | 377 private: |
| 378 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); | 378 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); |
| 379 }; | 379 }; |
| 380 | 380 |
| 381 } // namespace net | 381 } // namespace net |
| 382 | 382 |
| 383 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_ | 383 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_ |
| OLD | NEW |