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

Unified Diff: net/base/host_resolver_impl.cc

Issue 1615005: Flush socket pools and SPDY session pool properly on explicit requests and network changes. (Closed)
Patch Set: Fix minor leak. Created 10 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/base/host_resolver_impl.h ('k') | net/base/host_resolver_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/host_resolver_impl.cc
diff --git a/net/base/host_resolver_impl.cc b/net/base/host_resolver_impl.cc
index 44bbe418d71060e3c9a007da6b57f54cffc7da52..a8919202ecb1f42db9ca64b70c5592be0053301a 100644
--- a/net/base/host_resolver_impl.cc
+++ b/net/base/host_resolver_impl.cc
@@ -679,8 +679,6 @@ HostResolverImpl::HostResolverImpl(
#if defined(OS_WIN)
EnsureWinsockInit();
#endif
- if (network_change_notifier_)
- network_change_notifier_->AddObserver(this);
}
HostResolverImpl::~HostResolverImpl() {
@@ -695,9 +693,6 @@ HostResolverImpl::~HostResolverImpl() {
if (cur_completing_job_)
cur_completing_job_->Cancel();
- if (network_change_notifier_)
- network_change_notifier_->RemoveObserver(this);
-
// Delete the job pools.
for (size_t i = 0u; i < arraysize(job_pools_); ++i)
delete job_pools_[i];
@@ -841,7 +836,7 @@ void HostResolverImpl::SetDefaultAddressFamily(AddressFamily address_family) {
void HostResolverImpl::ProbeIPv6Support() {
DCHECK(!ipv6_probe_monitoring_);
ipv6_probe_monitoring_ = true;
- OnIPAddressChanged(); // Give initial setup call.
+ Flush(); // Give initial setup call.
}
void HostResolverImpl::Shutdown() {
@@ -1074,7 +1069,7 @@ void HostResolverImpl::OnCancelRequest(const BoundNetLog& net_log,
net_log.EndEvent(NetLog::TYPE_HOST_RESOLVER_IMPL);
}
-void HostResolverImpl::OnIPAddressChanged() {
+void HostResolverImpl::Flush() {
if (cache_.get())
cache_->clear();
if (ipv6_probe_monitoring_) {
« no previous file with comments | « net/base/host_resolver_impl.h ('k') | net/base/host_resolver_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698