Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: net/http/http_server_properties_impl.cc

Issue 2041863002: Remove HttpServerProperies::GetWeakPtr(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 for (SpdyServersMap::const_iterator it = spdy_servers_map_.begin(); 213 for (SpdyServersMap::const_iterator it = spdy_servers_map_.begin();
214 it != spdy_servers_map_.end() && count < max_size; ++it) { 214 it != spdy_servers_map_.end() && count < max_size; ++it) {
215 const std::string spdy_server = it->first; 215 const std::string spdy_server = it->first;
216 if (it->second) { 216 if (it->second) {
217 spdy_server_list->AppendString(spdy_server); 217 spdy_server_list->AppendString(spdy_server);
218 ++count; 218 ++count;
219 } 219 }
220 } 220 }
221 } 221 }
222 222
223 base::WeakPtr<HttpServerProperties> HttpServerPropertiesImpl::GetWeakPtr() {
224 return weak_ptr_factory_.GetWeakPtr();
225 }
226
227 void HttpServerPropertiesImpl::Clear() { 223 void HttpServerPropertiesImpl::Clear() {
228 DCHECK(CalledOnValidThread()); 224 DCHECK(CalledOnValidThread());
229 spdy_servers_map_.Clear(); 225 spdy_servers_map_.Clear();
230 alternative_service_map_.Clear(); 226 alternative_service_map_.Clear();
231 canonical_host_to_origin_map_.clear(); 227 canonical_host_to_origin_map_.clear();
232 spdy_settings_map_.Clear(); 228 spdy_settings_map_.Clear();
233 last_quic_address_ = IPAddress(); 229 last_quic_address_ = IPAddress();
234 server_network_stats_map_.Clear(); 230 server_network_stats_map_.Clear();
235 quic_server_info_map_.Clear(); 231 quic_server_info_map_.Clear();
236 } 232 }
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 base::TimeDelta delay = when > now ? when - now : base::TimeDelta(); 803 base::TimeDelta delay = when > now ? when - now : base::TimeDelta();
808 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( 804 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
809 FROM_HERE, 805 FROM_HERE,
810 base::Bind( 806 base::Bind(
811 &HttpServerPropertiesImpl::ExpireBrokenAlternateProtocolMappings, 807 &HttpServerPropertiesImpl::ExpireBrokenAlternateProtocolMappings,
812 weak_ptr_factory_.GetWeakPtr()), 808 weak_ptr_factory_.GetWeakPtr()),
813 delay); 809 delay);
814 } 810 }
815 811
816 } // namespace net 812 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698