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

Unified Diff: net/dns/host_resolver_impl.cc

Issue 2785563002: Expire but don't clear HostCache on DNS config change (Closed)
Patch Set: Created 3 years, 9 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/network_change_notifier.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/host_resolver_impl.cc
diff --git a/net/dns/host_resolver_impl.cc b/net/dns/host_resolver_impl.cc
index 31e535d0efa3c4a24e277068d7f34856be9361f4..bdaadc562ad710ad4b1218afcf16f49eaa802f23 100644
--- a/net/dns/host_resolver_impl.cc
+++ b/net/dns/host_resolver_impl.cc
@@ -2591,11 +2591,11 @@ void HostResolverImpl::UpdateDNSConfig(bool config_changed) {
if (config_changed) {
// If the DNS server has changed, existing cached info could be wrong so we
- // have to drop our internal cache :( Note that OS level DNS caches, such
+ // have to expire our internal cache :( Note that OS level DNS caches, such
// as NSCD's cache should be dropped automatically by the OS when
// resolv.conf changes so we don't need to do anything to clear that cache.
if (cache_.get()) {
- cache_->clear();
+ cache_->OnNetworkChange();
cache_hit_callbacks_.clear();
}
« no previous file with comments | « net/base/network_change_notifier.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698