Chromium Code Reviews| 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. |