| 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 #include "net/http/http_server_properties_impl.h" | 5 #include "net/http/http_server_properties_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 server_network_stats_map_.Clear(); | 233 server_network_stats_map_.Clear(); |
| 234 quic_server_info_map_.Clear(); | 234 quic_server_info_map_.Clear(); |
| 235 } | 235 } |
| 236 | 236 |
| 237 bool HttpServerPropertiesImpl::SupportsRequestPriority( | 237 bool HttpServerPropertiesImpl::SupportsRequestPriority( |
| 238 const HostPortPair& host_port_pair) { | 238 const HostPortPair& host_port_pair) { |
| 239 DCHECK(CalledOnValidThread()); | 239 DCHECK(CalledOnValidThread()); |
| 240 if (host_port_pair.host().empty()) | 240 if (host_port_pair.host().empty()) |
| 241 return false; | 241 return false; |
| 242 | 242 |
| 243 if (GetSupportsSpdy(host_port_pair)) | 243 if (GetSupportsSpdy(host_port_pair)) { |
| 244 return true; | 244 return true; |
| 245 } |
| 245 | 246 |
| 246 const AlternativeServiceVector alternative_service_vector = | 247 const AlternativeServiceVector alternative_service_vector = |
| 247 GetAlternativeServices(host_port_pair); | 248 GetAlternativeServices(host_port_pair); |
| 248 for (const AlternativeService& alternative_service : | 249 for (const AlternativeService& alternative_service : |
| 249 alternative_service_vector) { | 250 alternative_service_vector) { |
| 250 if (alternative_service.protocol == QUIC) { | 251 if (alternative_service.protocol == QUIC) { |
| 251 return true; | 252 return true; |
| 252 } | 253 } |
| 253 } | 254 } |
| 254 return false; | 255 return false; |
| (...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 817 base::TimeDelta delay = when > now ? when - now : base::TimeDelta(); | 818 base::TimeDelta delay = when > now ? when - now : base::TimeDelta(); |
| 818 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( | 819 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( |
| 819 FROM_HERE, | 820 FROM_HERE, |
| 820 base::Bind( | 821 base::Bind( |
| 821 &HttpServerPropertiesImpl::ExpireBrokenAlternateProtocolMappings, | 822 &HttpServerPropertiesImpl::ExpireBrokenAlternateProtocolMappings, |
| 822 weak_ptr_factory_.GetWeakPtr()), | 823 weak_ptr_factory_.GetWeakPtr()), |
| 823 delay); | 824 delay); |
| 824 } | 825 } |
| 825 | 826 |
| 826 } // namespace net | 827 } // namespace net |
| OLD | NEW |