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

Unified Diff: net/proxy/proxy_resolver_js_bindings.cc

Issue 303022: Disable IPv6 results for the PAC bindings:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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
Index: net/proxy/proxy_resolver_js_bindings.cc
===================================================================
--- net/proxy/proxy_resolver_js_bindings.cc (revision 29678)
+++ net/proxy/proxy_resolver_js_bindings.cc (working copy)
@@ -32,9 +32,12 @@
}
// Run the resolve on host_resolver_loop, and wait for result.
- int Resolve(const std::string& hostname, net::AddressList* addresses) {
+ int Resolve(const std::string& hostname,
+ AddressFamily address_family,
+ net::AddressList* addresses) {
// Port number doesn't matter.
HostResolver::RequestInfo info(hostname, 80);
+ info.set_address_family(address_family);
// Hack for tests -- run synchronously on current thread.
if (!host_resolver_loop_)
@@ -107,8 +110,11 @@
return std::string();
// Do a sync resolve of the hostname.
+ // Disable IPv6 results, see http://crbug.com/24641 for motivation.
wtc 2009/10/22 21:53:54 The motivation is short (dnsResolve is IPv4 only).
net::AddressList address_list;
- int result = host_resolver_->Resolve(host, &address_list);
+ int result = host_resolver_->Resolve(host,
+ ADDRESS_FAMILY_IPV4_ONLY,
wtc 2009/10/22 21:53:54 Nit: do we really need _ONLY in the enum constant
+ &address_list);
if (result != OK)
return std::string(); // Failed.

Powered by Google App Engine
This is Rietveld 408576698