| 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 <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 | 150 |
| 151 virtual void SetPipelineCapability( | 151 virtual void SetPipelineCapability( |
| 152 const HostPortPair& origin, | 152 const HostPortPair& origin, |
| 153 HttpPipelinedHostCapability capability) OVERRIDE; | 153 HttpPipelinedHostCapability capability) OVERRIDE; |
| 154 | 154 |
| 155 virtual void ClearPipelineCapabilities() OVERRIDE; | 155 virtual void ClearPipelineCapabilities() OVERRIDE; |
| 156 | 156 |
| 157 virtual PipelineCapabilityMap GetPipelineCapabilityMap() const OVERRIDE; | 157 virtual PipelineCapabilityMap GetPipelineCapabilityMap() const OVERRIDE; |
| 158 | 158 |
| 159 private: | 159 private: |
| 160 typedef base::MRUCache< | 160 typedef base::MRUCache<HostPortPair, HttpPipelinedHostCapability> |
| 161 HostPortPair, HttpPipelinedHostCapability> CachedPipelineCapabilityMap; | 161 CachedPipelineCapabilityMap; |
| 162 // |spdy_servers_map_| has flattened representation of servers (host, port) | 162 // |spdy_servers_map_| has flattened representation of servers (host, port) |
| 163 // that either support or not support SPDY protocol. | 163 // that either support or not support SPDY protocol. |
| 164 typedef base::MRUCache<std::string, bool> SpdyServerHostPortMap; | 164 typedef base::MRUCache<std::string, bool> SpdyServerHostPortMap; |
| 165 typedef std::map<HostPortPair, NetworkStats> ServerNetworkStatsMap; | 165 typedef std::map<HostPortPair, NetworkStats> ServerNetworkStatsMap; |
| 166 typedef std::map<HostPortPair, HostPortPair> CanonicalHostMap; | 166 typedef std::map<HostPortPair, HostPortPair> CanonicalHostMap; |
| 167 typedef std::vector<std::string> CanonicalSufficList; | 167 typedef std::vector<std::string> CanonicalSufficList; |
| 168 // List of broken host:ports and the times when they can be expired. | 168 // List of broken host:ports and the times when they can be expired. |
| 169 struct BrokenAlternateProtocolEntry { | 169 struct BrokenAlternateProtocolEntry { |
| 170 HostPortPair server; | 170 HostPortPair server; |
| 171 base::TimeTicks when; | 171 base::TimeTicks when; |
| 172 }; | 172 }; |
| 173 typedef std::list<BrokenAlternateProtocolEntry> | 173 typedef std::list<BrokenAlternateProtocolEntry> BrokenAlternateProtocolList; |
| 174 BrokenAlternateProtocolList; | |
| 175 // Map from host:port to the number of times alternate protocol has | 174 // Map from host:port to the number of times alternate protocol has |
| 176 // been marked broken. | 175 // been marked broken. |
| 177 typedef std::map<HostPortPair, int> BrokenAlternateProtocolMap; | 176 typedef std::map<HostPortPair, int> BrokenAlternateProtocolMap; |
| 178 | 177 |
| 179 // Return the canonical host for |server|, or end if none exists. | 178 // Return the canonical host for |server|, or end if none exists. |
| 180 CanonicalHostMap::const_iterator GetCanonicalHost(HostPortPair server) const; | 179 CanonicalHostMap::const_iterator GetCanonicalHost(HostPortPair server) const; |
| 181 | 180 |
| 182 void ExpireBrokenAlternateProtocolMappings(); | 181 void ExpireBrokenAlternateProtocolMappings(); |
| 183 void ScheduleBrokenAlternateProtocolMappingsExpiration(); | 182 void ScheduleBrokenAlternateProtocolMappingsExpiration(); |
| 184 | 183 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 200 CanonicalSufficList canoncial_suffixes_; | 199 CanonicalSufficList canoncial_suffixes_; |
| 201 | 200 |
| 202 base::WeakPtrFactory<HttpServerPropertiesImpl> weak_ptr_factory_; | 201 base::WeakPtrFactory<HttpServerPropertiesImpl> weak_ptr_factory_; |
| 203 | 202 |
| 204 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesImpl); | 203 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesImpl); |
| 205 }; | 204 }; |
| 206 | 205 |
| 207 } // namespace net | 206 } // namespace net |
| 208 | 207 |
| 209 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_IMPL_H_ | 208 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_IMPL_H_ |
| OLD | NEW |