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

Unified Diff: net/base/host_resolver_proc.cc

Issue 7737034: Revert 99677 (didn't help) - Revert 99666 (sync tests started failing on mac10.6: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 3 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.cc ('k') | net/base/network_change_notifier.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/host_resolver_proc.cc
===================================================================
--- net/base/host_resolver_proc.cc (revision 99692)
+++ net/base/host_resolver_proc.cc (working copy)
@@ -8,7 +8,7 @@
#include "base/logging.h"
#include "net/base/address_list.h"
-#include "net/base/dns_reload_timer.h"
+#include "net/base/dns_reloader.h"
#include "net/base/net_errors.h"
#include "net/base/sys_addrinfo.h"
@@ -183,22 +183,12 @@
// Restrict result set to only this socket type to avoid duplicates.
hints.ai_socktype = SOCK_STREAM;
- int err = getaddrinfo(host.c_str(), NULL, &hints, &ai);
- bool should_retry = false;
#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \
!defined(OS_ANDROID)
- // If we fail, re-initialise the resolver just in case there have been any
- // changes to /etc/resolv.conf and retry. See http://crbug.com/11380 for info.
- if (err && DnsReloadTimerHasExpired()) {
- // When there's no network connection, _res may not be initialized by
- // getaddrinfo. Therefore, we call res_nclose only when there are ns
- // entries.
- if (_res.nscount > 0)
- res_nclose(&_res);
- if (!res_ninit(&_res))
- should_retry = true;
- }
+ DnsReloaderMaybeReload();
#endif
+ int err = getaddrinfo(host.c_str(), NULL, &hints, &ai);
+ bool should_retry = false;
// If the lookup was restricted (either by address family, or address
// detection), and the results where all localhost of a single family,
// maybe we should retry. There were several bugs related to these
« no previous file with comments | « net/base/host_resolver_impl.cc ('k') | net/base/network_change_notifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698