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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
209 | 209 |
210 typedef std::vector<AlternativeService> AlternativeServiceVector; | 210 typedef std::vector<AlternativeService> AlternativeServiceVector; |
211 typedef std::vector<AlternativeServiceInfo> AlternativeServiceInfoVector; | 211 typedef std::vector<AlternativeServiceInfo> AlternativeServiceInfoVector; |
212 typedef base::MRUCache<HostPortPair, AlternativeServiceInfoVector> | 212 typedef base::MRUCache<HostPortPair, AlternativeServiceInfoVector> |
213 AlternativeServiceMap; | 213 AlternativeServiceMap; |
214 typedef base::MRUCache<HostPortPair, SettingsMap> SpdySettingsMap; | 214 typedef base::MRUCache<HostPortPair, SettingsMap> SpdySettingsMap; |
215 typedef base::MRUCache<HostPortPair, ServerNetworkStats> ServerNetworkStatsMap; | 215 typedef base::MRUCache<HostPortPair, ServerNetworkStats> ServerNetworkStatsMap; |
216 typedef base::MRUCache<QuicServerId, std::string> QuicServerInfoMap; | 216 typedef base::MRUCache<QuicServerId, std::string> QuicServerInfoMap; |
217 | 217 |
218 // Persist 5 QUIC Servers. This is mainly used by cronet. | 218 // Persist 5 QUIC Servers. This is mainly used by cronet. |
219 const int kMaxQuicServersToPersist = 5; | 219 const size_t kMaxQuicServersToPersist = 5; |
mef
2016/01/15 16:12:32
should this remain int?
ramant (doing other things)
2016/01/15 18:57:00
Used size_t for the size everywhere to be consiste
| |
220 | 220 |
221 extern const char kAlternateProtocolHeader[]; | 221 extern const char kAlternateProtocolHeader[]; |
222 extern const char kAlternativeServiceHeader[]; | 222 extern const char kAlternativeServiceHeader[]; |
223 | 223 |
224 // The interface for setting/retrieving the HTTP server properties. | 224 // The interface for setting/retrieving the HTTP server properties. |
225 // Currently, this class manages servers': | 225 // Currently, this class manages servers': |
226 // * SPDY support (based on NPN results). | 226 // * SPDY support (based on NPN results). |
227 // * alternative service support. | 227 // * alternative service support. |
228 // * SPDY Settings (like CWND ID field). | 228 // * SPDY Settings (like CWND ID field). |
229 // * QUIC data (like ServerNetworkStats and QuicServerInfo). | 229 // * QUIC data (like ServerNetworkStats and QuicServerInfo). |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
373 virtual bool SetQuicServerInfo(const QuicServerId& server_id, | 373 virtual bool SetQuicServerInfo(const QuicServerId& server_id, |
374 const std::string& server_info) = 0; | 374 const std::string& server_info) = 0; |
375 | 375 |
376 // Get QuicServerInfo (in std::string form) for the given |server_id|. | 376 // Get QuicServerInfo (in std::string form) for the given |server_id|. |
377 virtual const std::string* GetQuicServerInfo( | 377 virtual const std::string* GetQuicServerInfo( |
378 const QuicServerId& server_id) = 0; | 378 const QuicServerId& server_id) = 0; |
379 | 379 |
380 // Returns all persistent QuicServerInfo objects. | 380 // Returns all persistent QuicServerInfo objects. |
381 virtual const QuicServerInfoMap& quic_server_info_map() const = 0; | 381 virtual const QuicServerInfoMap& quic_server_info_map() const = 0; |
382 | 382 |
383 // Returns the number of server configs (QuicServerInfo objects) persisted. | |
384 virtual int max_server_configs_stored_in_properties() const = 0; | |
385 | |
386 // Sets the number of server configs (QuicServerInfo objects) to be persisted. | |
387 virtual void set_max_server_configs_stored_in_properties( | |
388 int max_server_configs_stored_in_properties) = 0; | |
389 | |
383 private: | 390 private: |
384 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); | 391 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); |
385 }; | 392 }; |
386 | 393 |
387 } // namespace net | 394 } // namespace net |
388 | 395 |
389 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_ | 396 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_ |
OLD | NEW |