| 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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 // Returns all alternative service mappings as human readable strings. | 286 // Returns all alternative service mappings as human readable strings. |
| 287 // Empty alternative service hostnames will be printed as such. | 287 // Empty alternative service hostnames will be printed as such. |
| 288 virtual std::unique_ptr<base::Value> GetAlternativeServiceInfoAsValue() | 288 virtual std::unique_ptr<base::Value> GetAlternativeServiceInfoAsValue() |
| 289 const = 0; | 289 const = 0; |
| 290 | 290 |
| 291 virtual bool GetSupportsQuic(IPAddress* last_address) const = 0; | 291 virtual bool GetSupportsQuic(IPAddress* last_address) const = 0; |
| 292 | 292 |
| 293 virtual void SetSupportsQuic(bool used_quic, | 293 virtual void SetSupportsQuic(bool used_quic, |
| 294 const IPAddress& last_address) = 0; | 294 const IPAddress& last_address) = 0; |
| 295 | 295 |
| 296 // Sets |stats| for |host_port_pair|. | 296 // Sets |stats| for |server|. |
| 297 virtual void SetServerNetworkStats(const url::SchemeHostPort& server, | 297 virtual void SetServerNetworkStats(const url::SchemeHostPort& server, |
| 298 ServerNetworkStats stats) = 0; | 298 ServerNetworkStats stats) = 0; |
| 299 | 299 |
| 300 // Clears any stats for |server|. |
| 301 virtual void ClearServerNetworkStats(const url::SchemeHostPort& server) = 0; |
| 302 |
| 303 // Returns any stats for |server| or nullptr if there are none. |
| 300 virtual const ServerNetworkStats* GetServerNetworkStats( | 304 virtual const ServerNetworkStats* GetServerNetworkStats( |
| 301 const url::SchemeHostPort& server) = 0; | 305 const url::SchemeHostPort& server) = 0; |
| 302 | 306 |
| 303 virtual const ServerNetworkStatsMap& server_network_stats_map() const = 0; | 307 virtual const ServerNetworkStatsMap& server_network_stats_map() const = 0; |
| 304 | 308 |
| 305 // Save QuicServerInfo (in std::string form) for the given |server_id|. | 309 // Save QuicServerInfo (in std::string form) for the given |server_id|. |
| 306 // Returns true if the value has changed otherwise it returns false. | 310 // Returns true if the value has changed otherwise it returns false. |
| 307 virtual bool SetQuicServerInfo(const QuicServerId& server_id, | 311 virtual bool SetQuicServerInfo(const QuicServerId& server_id, |
| 308 const std::string& server_info) = 0; | 312 const std::string& server_info) = 0; |
| 309 | 313 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 324 // Returns whether HttpServerProperties is initialized. | 328 // Returns whether HttpServerProperties is initialized. |
| 325 virtual bool IsInitialized() const = 0; | 329 virtual bool IsInitialized() const = 0; |
| 326 | 330 |
| 327 private: | 331 private: |
| 328 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); | 332 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); |
| 329 }; | 333 }; |
| 330 | 334 |
| 331 } // namespace net | 335 } // namespace net |
| 332 | 336 |
| 333 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_ | 337 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_ |
| OLD | NEW |