| 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_IMPL_H_ | 5 #ifndef NET_HTTP_HTTP_SERVER_PROPERTIES_IMPL_H_ |
| 6 #define NET_HTTP_HTTP_SERVER_PROPERTIES_IMPL_H_ | 6 #define NET_HTTP_HTTP_SERVER_PROPERTIES_IMPL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 struct BrokenAlternateProtocolEntry { | 175 struct BrokenAlternateProtocolEntry { |
| 176 HostPortPair server; | 176 HostPortPair server; |
| 177 base::TimeTicks when; | 177 base::TimeTicks when; |
| 178 }; | 178 }; |
| 179 typedef std::list<BrokenAlternateProtocolEntry> | 179 typedef std::list<BrokenAlternateProtocolEntry> |
| 180 BrokenAlternateProtocolList; | 180 BrokenAlternateProtocolList; |
| 181 // Map from host:port to the number of times alternate protocol has | 181 // Map from host:port to the number of times alternate protocol has |
| 182 // been marked broken. | 182 // been marked broken. |
| 183 typedef std::map<HostPortPair, int> BrokenAlternateProtocolMap; | 183 typedef std::map<HostPortPair, int> BrokenAlternateProtocolMap; |
| 184 | 184 |
| 185 // Return the iterator for |server|, or for its canonical host, or end. |
| 186 AlternateProtocolMap::const_iterator GetAlternateProtocolIterator( |
| 187 const HostPortPair& server); |
| 188 |
| 185 // Return the canonical host for |server|, or end if none exists. | 189 // Return the canonical host for |server|, or end if none exists. |
| 186 CanonicalHostMap::const_iterator GetCanonicalHost(HostPortPair server) const; | 190 CanonicalHostMap::const_iterator GetCanonicalHost(HostPortPair server) const; |
| 187 | 191 |
| 188 void RemoveCanonicalHost(const HostPortPair& server); | 192 void RemoveCanonicalHost(const HostPortPair& server); |
| 189 void ExpireBrokenAlternateProtocolMappings(); | 193 void ExpireBrokenAlternateProtocolMappings(); |
| 190 void ScheduleBrokenAlternateProtocolMappingsExpiration(); | 194 void ScheduleBrokenAlternateProtocolMappingsExpiration(); |
| 191 | 195 |
| 192 SpdyServerHostPortMap spdy_servers_map_; | 196 SpdyServerHostPortMap spdy_servers_map_; |
| 193 Http11ServerHostPortSet http11_servers_; | 197 Http11ServerHostPortSet http11_servers_; |
| 194 | 198 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 210 double alternate_protocol_probability_threshold_; | 214 double alternate_protocol_probability_threshold_; |
| 211 | 215 |
| 212 base::WeakPtrFactory<HttpServerPropertiesImpl> weak_ptr_factory_; | 216 base::WeakPtrFactory<HttpServerPropertiesImpl> weak_ptr_factory_; |
| 213 | 217 |
| 214 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesImpl); | 218 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesImpl); |
| 215 }; | 219 }; |
| 216 | 220 |
| 217 } // namespace net | 221 } // namespace net |
| 218 | 222 |
| 219 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_IMPL_H_ | 223 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_IMPL_H_ |
| OLD | NEW |