Chromium Code Reviews

Side by Side Diff: net/http/http_server_properties.h

Issue 1572753003: QUIC - Allow cronet apps to specify how many server configs are to be (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: load all server configs from disk Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
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 199 matching lines...)
210 210
211 typedef std::vector<AlternativeService> AlternativeServiceVector; 211 typedef std::vector<AlternativeService> AlternativeServiceVector;
212 typedef std::vector<AlternativeServiceInfo> AlternativeServiceInfoVector; 212 typedef std::vector<AlternativeServiceInfo> AlternativeServiceInfoVector;
213 typedef base::MRUCache<HostPortPair, AlternativeServiceInfoVector> 213 typedef base::MRUCache<HostPortPair, AlternativeServiceInfoVector>
214 AlternativeServiceMap; 214 AlternativeServiceMap;
215 typedef base::MRUCache<HostPortPair, SettingsMap> SpdySettingsMap; 215 typedef base::MRUCache<HostPortPair, SettingsMap> SpdySettingsMap;
216 typedef base::MRUCache<HostPortPair, ServerNetworkStats> ServerNetworkStatsMap; 216 typedef base::MRUCache<HostPortPair, ServerNetworkStats> ServerNetworkStatsMap;
217 typedef base::MRUCache<QuicServerId, std::string> QuicServerInfoMap; 217 typedef base::MRUCache<QuicServerId, std::string> QuicServerInfoMap;
218 218
219 // Persist 5 QUIC Servers. This is mainly used by cronet. 219 // Persist 5 QUIC Servers. This is mainly used by cronet.
220 const int kMaxQuicServersToPersist = 5; 220 const size_t kMaxQuicServersToPersist = 5;
221 221
222 extern const char kAlternateProtocolHeader[]; 222 extern const char kAlternateProtocolHeader[];
223 extern const char kAlternativeServiceHeader[]; 223 extern const char kAlternativeServiceHeader[];
224 224
225 // The interface for setting/retrieving the HTTP server properties. 225 // The interface for setting/retrieving the HTTP server properties.
226 // Currently, this class manages servers': 226 // Currently, this class manages servers':
227 // * SPDY support (based on NPN results). 227 // * SPDY support (based on NPN results).
228 // * alternative service support. 228 // * alternative service support.
229 // * SPDY Settings (like CWND ID field). 229 // * SPDY Settings (like CWND ID field).
230 // * QUIC data (like ServerNetworkStats and QuicServerInfo). 230 // * QUIC data (like ServerNetworkStats and QuicServerInfo).
(...skipping 143 matching lines...)
374 virtual bool SetQuicServerInfo(const QuicServerId& server_id, 374 virtual bool SetQuicServerInfo(const QuicServerId& server_id,
375 const std::string& server_info) = 0; 375 const std::string& server_info) = 0;
376 376
377 // Get QuicServerInfo (in std::string form) for the given |server_id|. 377 // Get QuicServerInfo (in std::string form) for the given |server_id|.
378 virtual const std::string* GetQuicServerInfo( 378 virtual const std::string* GetQuicServerInfo(
379 const QuicServerId& server_id) = 0; 379 const QuicServerId& server_id) = 0;
380 380
381 // Returns all persistent QuicServerInfo objects. 381 // Returns all persistent QuicServerInfo objects.
382 virtual const QuicServerInfoMap& quic_server_info_map() const = 0; 382 virtual const QuicServerInfoMap& quic_server_info_map() const = 0;
383 383
384 // Returns the number of server configs (QuicServerInfo objects) persisted.
385 virtual int number_of_server_configs_stored_in_properties() const = 0;
386
387 // Sets the number of server configs (QuicServerInfo objects) to be persisted.
388 virtual void set_number_of_server_configs_stored_in_properties(
389 int number_of_server_configs_stored_in_properties) = 0;
390
384 private: 391 private:
385 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); 392 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties);
386 }; 393 };
387 394
388 } // namespace net 395 } // namespace net
389 396
390 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_ 397 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_
OLDNEW

Powered by Google App Engine