| 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 <memory> | 8 #include <memory> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 for (SpdyServersMap::const_iterator it = spdy_servers_map_.begin(); | 212 for (SpdyServersMap::const_iterator it = spdy_servers_map_.begin(); |
| 213 it != spdy_servers_map_.end() && count < max_size; ++it) { | 213 it != spdy_servers_map_.end() && count < max_size; ++it) { |
| 214 const std::string spdy_server = it->first; | 214 const std::string spdy_server = it->first; |
| 215 if (it->second) { | 215 if (it->second) { |
| 216 spdy_server_list->AppendString(spdy_server); | 216 spdy_server_list->AppendString(spdy_server); |
| 217 ++count; | 217 ++count; |
| 218 } | 218 } |
| 219 } | 219 } |
| 220 } | 220 } |
| 221 | 221 |
| 222 base::WeakPtr<HttpServerProperties> HttpServerPropertiesImpl::GetWeakPtr() { | |
| 223 return weak_ptr_factory_.GetWeakPtr(); | |
| 224 } | |
| 225 | |
| 226 void HttpServerPropertiesImpl::Clear() { | 222 void HttpServerPropertiesImpl::Clear() { |
| 227 DCHECK(CalledOnValidThread()); | 223 DCHECK(CalledOnValidThread()); |
| 228 spdy_servers_map_.Clear(); | 224 spdy_servers_map_.Clear(); |
| 229 alternative_service_map_.Clear(); | 225 alternative_service_map_.Clear(); |
| 230 canonical_host_to_origin_map_.clear(); | 226 canonical_host_to_origin_map_.clear(); |
| 231 spdy_settings_map_.Clear(); | 227 spdy_settings_map_.Clear(); |
| 232 last_quic_address_ = IPAddress(); | 228 last_quic_address_ = IPAddress(); |
| 233 server_network_stats_map_.Clear(); | 229 server_network_stats_map_.Clear(); |
| 234 quic_server_info_map_.Clear(); | 230 quic_server_info_map_.Clear(); |
| 235 } | 231 } |
| (...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 783 base::TimeDelta delay = when > now ? when - now : base::TimeDelta(); | 779 base::TimeDelta delay = when > now ? when - now : base::TimeDelta(); |
| 784 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( | 780 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( |
| 785 FROM_HERE, | 781 FROM_HERE, |
| 786 base::Bind( | 782 base::Bind( |
| 787 &HttpServerPropertiesImpl::ExpireBrokenAlternateProtocolMappings, | 783 &HttpServerPropertiesImpl::ExpireBrokenAlternateProtocolMappings, |
| 788 weak_ptr_factory_.GetWeakPtr()), | 784 weak_ptr_factory_.GetWeakPtr()), |
| 789 delay); | 785 delay); |
| 790 } | 786 } |
| 791 | 787 |
| 792 } // namespace net | 788 } // namespace net |
| OLD | NEW |