summaryrefslogtreecommitdiffstats
path: root/net/base/host_resolver_proc.cc
Commit message (Collapse)AuthorAgeFilesLines
* Revert 38078 - Turn off ipv6 when there is no support at startup.jar@chromium.org2010-02-041-23/+0
| | | | | | | | | | | | | | | IPv6 confusion (attempt to support when it is really not supported) has been harming performance, and this may help *some* users that don't have ipv6 support. BUG=12754 r=wtc Review URL: http://codereview.chromium.org/564052 TBR=jar@chromium.org Review URL: http://codereview.chromium.org/574001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38083 0039d316-1c4b-4281-b951-d872f2087c98
* Turn off ipv6 when there is no support at startup.jar@chromium.org2010-02-041-0/+23
| | | | | | | | | | | | IPv6 confusion (attempt to support when it is really not supported) has been harming performance, and this may help *some* users that don't have ipv6 support. BUG=12754 r=wtc Review URL: http://codereview.chromium.org/564052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38078 0039d316-1c4b-4281-b951-d872f2087c98
* BSD port: USE_NSS and other macros instead of OS_LINUX where applicablepvalchev@google.com2010-01-291-8/+13
| | | | | | Review URL: http://codereview.chromium.org/556068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37492 0039d316-1c4b-4281-b951-d872f2087c98
* Add autodetection of "intranet" redirection, for ISPs etc. that send typos ↵pkasting@chromium.org2010-01-081-3/+25
| | | | | | | | | | and nonexistent addresses to custom pages, and plumb it to the code that puts up infobars when users type in a search that appears to be an intranet address, so we don't show these for erroneous cases. BUG=31556 TEST=none Review URL: http://codereview.chromium.org/525079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35807 0039d316-1c4b-4281-b951-d872f2087c98
* Minor cleanup: add a sys_addrinfo.h header that hides the platform-specific ↵eroman@chromium.org2009-12-121-7/+1
| | | | | | | | | | includes needed for struct addrinfo / struct sockaddr, since we were duplicating that #if #else logic in a growing number of places. BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/491038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34399 0039d316-1c4b-4281-b951-d872f2087c98
* [GTTF] Apply test isolation goodness to net_unittests.phajdan.jr@chromium.org2009-12-021-6/+12
| | | | | | | | | TEST=Covered by net_unittests and test_shell_tests. BUG=12710 Review URL: http://codereview.chromium.org/460014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33594 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Apply test isolation goodness to net_unittests."phajdan.jr@chromium.org2009-11-261-11/+6
| | | | | | | | | | | | | Revert "Fix a memory leak in DnsReloadTimer" Valgrind test_shell_tests still fails, will investigate offline. :( TBR=wtc BUG=12710 Review URL: http://codereview.chromium.org/434115 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33205 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a memory leak in DnsReloadTimerphajdan.jr@chromium.org2009-11-261-0/+1
| | | | | | | | | TBR=wtc BUG=12710 Review URL: http://codereview.chromium.org/443019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33204 0039d316-1c4b-4281-b951-d872f2087c98
* Apply test isolation goodness to net_unittests.phajdan.jr@chromium.org2009-11-261-6/+10
| | | | | | | | | | | | We're going to have it enabled for all tests, but I'm enabling it one-by-one to limit damage from possible problems. TEST=none BUG=12710 Review URL: http://codereview.chromium.org/439007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33202 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the temporary instrumentation to getaddrinfo().eroman@chromium.org2009-11-251-20/+1
| | | | | | | | | | This is a revert of r31267. BUG=22083 Review URL: http://codereview.chromium.org/434048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33009 0039d316-1c4b-4281-b951-d872f2087c98
* Add some instrumentation to SystemHostResolverProc() to capture the hostname ↵eroman@chromium.org2009-11-061-1/+20
| | | | | | | | | | | | when getaddrinfo() crashes. This may help understand why we are seeing crashes in getaddrinfo() in the field. BUG=22083 Review URL: http://codereview.chromium.org/378011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31267 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor: Address some style comments from a review (which missed the ↵eroman@chromium.org2009-10-231-1/+8
| | | | | | | | original check-in). Review URL: http://codereview.chromium.org/322009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29874 0039d316-1c4b-4281-b951-d872f2087c98
* Add a mechanism to disable IPv6.eroman@chromium.org2009-10-211-4/+14
| | | | | | | | | | | | | | | | | | | (1) Adds the ability to specify the address family on a per-request basis. (2) Exposes a --disable-ipv6 flag to chrome that changes the default address family from AF_UNSPEC to AF_INET (same sort of thing Firefox does). (3) Changes the backing datastructure for HostCache:EntryMap and HostResolverImpl::JobMap from a "hash_map" to a "std::map". This was for consistency with other code (when I went to add a custom hash trait, I couldn't find any existing code which was using hashmap for custom keys). (4) Updates about:net-internals to display an address family for the hostcache dump (since it is now a part of the key). This change is in anticipation of turning off IPv6 host resolving in the PAC utility functions (see bug 24641). But it is also a feature addition. BUG=24641 TEST=HostCacheTest.AddressFamilyIsPartOfKey Review URL: http://codereview.chromium.org/302010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29686 0039d316-1c4b-4281-b951-d872f2087c98
* Non-blocking connect() attempts may fail synchronously in some cases. Whenmark@chromium.org2009-09-111-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this occurs, connect() should be retried with another address if possible and appropriate. On Mac OS X 10.6 ("Snow Leopard"), getaddrinfo() returns IPv6 addresses even when inappropriate due to the use of AI_ADDRCONFIG. connect() fails immediately when trying to connect to an IPv6 address from a system that only has IPv4 connectivity. The existing net::TCPClientSocketLibevent is not prepared to deal with immediate connect() failures, so it fails without trying additional addresses. Some sites, such as python.org, publish both IPv4 and IPv6 addresses. On Snow Leopard, name resolution always returns the IPv6 addresses first, rendering such sites impossible to connect to unless reachable by IPv6. This change restores the previous behavior of setting AI_ADDRCONFIG when calling getaddrinfo() on Mac OS X. AI_ADDRCONFIG was removed in a previous attempt to fix this bug. AI_ADDRCONFIG is now documented in Snow Leopard. The associated comment, written for Mac OS X 10.5 ("Leopard"), is no longer correct. In most cases, the presence or absence of this flag seems to have no impact on the system resolver's behavior, but I believe that its presence is correct per the documentation. A separate bug will be filed with Apple. BUG=12711 TEST=http://python.org/ on Snow Leopard should load on a machine where only IPv4 is available; it (and all other sites) should continue to function properly on Leopard Review URL: http://codereview.chromium.org/196094 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26051 0039d316-1c4b-4281-b951-d872f2087c98
* Don't use the AI_ADDRCONFIG flag on Mac OS X. It's not necessary.wtc@chromium.org2009-08-171-0/+17
| | | | | | | | | | | Hopefully this will fix issue 12711. R=eroman,mark BUG=http://crbug.com/12711 TEST=covered by existing unit tests and normal browsing on Mac Review URL: http://codereview.chromium.org/172061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23590 0039d316-1c4b-4281-b951-d872f2087c98
* Undisable HostResolverImplTest.EmptyHost, by making empty host fail to resolve.ericroman@google.com2009-08-171-0/+6
| | | | | | Review URL: http://codereview.chromium.org/164546 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23576 0039d316-1c4b-4281-b951-d872f2087c98
* Refactorings surrounding HostResolver:ericroman@google.com2009-07-151-0/+180
(1) Extract HostResolver to an interface. The existing concrete implementation is now named HostResolverImpl. This makes it possible to create mocks with more complex behavior (i.e. choose via rules if response will be sync vs async). (2) Transform HostMapper into HostResolverProc. Conceptually HostResolverProc maps a hostname to a socket address, whereas HostMapper mapped a hostname to another hostname (so you were still at the mercy of the system's host resolver). With HostResolverProc you can specify the exact AddressList, making it possible to run tests requiring IPv6 socketaddrs on systems (like WinXP) that don't actually support it. (3) Add a MockHostResolver implementation of HostResolver. This replaces the [ScopedHostMapper + RuleBasedHostMapper + HostResolver] combo. It is less clunky and a bit more expressive. BUG=http://crbug.com/16452 R=willchan TEST=existing Review URL: http://codereview.chromium.org/149511 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20795 0039d316-1c4b-4281-b951-d872f2087c98