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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 } | 168 } |
169 | 169 |
170 base::TimeDelta srtt; | 170 base::TimeDelta srtt; |
171 QuicBandwidth bandwidth_estimate; | 171 QuicBandwidth bandwidth_estimate; |
172 }; | 172 }; |
173 | 173 |
174 typedef std::vector<AlternativeService> AlternativeServiceVector; | 174 typedef std::vector<AlternativeService> AlternativeServiceVector; |
175 typedef std::vector<AlternativeServiceInfo> AlternativeServiceInfoVector; | 175 typedef std::vector<AlternativeServiceInfo> AlternativeServiceInfoVector; |
176 typedef base::MRUCache<url::SchemeHostPort, AlternativeServiceInfoVector> | 176 typedef base::MRUCache<url::SchemeHostPort, AlternativeServiceInfoVector> |
177 AlternativeServiceMap; | 177 AlternativeServiceMap; |
| 178 // Map to the number of times each alternative service has been marked broken. |
| 179 typedef base::MRUCache<AlternativeService, int> |
| 180 RecentlyBrokenAlternativeServices; |
178 typedef base::MRUCache<url::SchemeHostPort, ServerNetworkStats> | 181 typedef base::MRUCache<url::SchemeHostPort, ServerNetworkStats> |
179 ServerNetworkStatsMap; | 182 ServerNetworkStatsMap; |
180 typedef base::MRUCache<QuicServerId, std::string> QuicServerInfoMap; | 183 typedef base::MRUCache<QuicServerId, std::string> QuicServerInfoMap; |
181 | 184 |
182 // Persist 5 QUIC Servers. This is mainly used by cronet. | 185 // Persist 5 QUIC Servers. This is mainly used by cronet. |
183 const int kMaxQuicServersToPersist = 5; | 186 const int kMaxQuicServersToPersist = 5; |
184 | 187 |
185 extern const char kAlternativeServiceHeader[]; | 188 extern const char kAlternativeServiceHeader[]; |
186 | 189 |
187 // The interface for setting/retrieving the HTTP server properties. | 190 // The interface for setting/retrieving the HTTP server properties. |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 // Returns whether HttpServerProperties is initialized. | 331 // Returns whether HttpServerProperties is initialized. |
329 virtual bool IsInitialized() const = 0; | 332 virtual bool IsInitialized() const = 0; |
330 | 333 |
331 private: | 334 private: |
332 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); | 335 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); |
333 }; | 336 }; |
334 | 337 |
335 } // namespace net | 338 } // namespace net |
336 | 339 |
337 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_ | 340 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_ |
OLD | NEW |