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

Unified Diff: net/base/host_resolver_impl.cc

Issue 303026: Refactor: Change the interface HostResolver::DisableIPv6() to HostResolver::SetDefaultA... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Add another comment by the switch 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
« no previous file with comments | « net/base/host_resolver_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/host_resolver_impl.cc
===================================================================
--- net/base/host_resolver_impl.cc (revision 29880)
+++ net/base/host_resolver_impl.cc (working copy)
@@ -293,7 +293,7 @@
: cache_(max_cache_entries, cache_duration_ms),
next_request_id_(0),
resolver_proc_(resolver_proc),
- disable_ipv6_(false),
+ default_address_family_(ADDRESS_FAMILY_UNSPECIFIED),
shutdown_(false) {
#if defined(OS_WIN)
EnsureWinsockInit();
@@ -330,8 +330,8 @@
// Build a key that identifies the request in the cache and in the
// outstanding jobs map.
Key key(info.hostname(), info.address_family());
- if (disable_ipv6_)
- key.address_family = ADDRESS_FAMILY_IPV4;
+ if (key.address_family == ADDRESS_FAMILY_UNSPECIFIED)
+ key.address_family = default_address_family_;
// If we have an unexpired cache entry, use it.
if (info.allow_cached_response()) {
« no previous file with comments | « net/base/host_resolver_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698