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

Unified Diff: net/base/host_resolver_impl.cc

Issue 3115014: Revert 56384 - Don't resolve IP literals.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 4 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/address_list_unittest.cc ('k') | net/base/host_resolver_impl_unittest.cc » ('j') | 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 56384)
+++ net/base/host_resolver_impl.cc (working copy)
@@ -754,6 +754,8 @@
delete job_pools_[i];
}
+// TODO(eroman): Don't create cache entries for hostnames which are simply IP
+// address literals.
int HostResolverImpl::Resolve(const RequestInfo& info,
AddressList* addresses,
CompletionCallback* callback,
@@ -770,23 +772,6 @@
// Update the net log and notify registered observers.
OnStartRequest(net_log, request_id, info);
- // Check for IP literal.
- IPAddressNumber ip_number;
- if (ParseIPLiteralToNumber(info.hostname(), &ip_number)) {
- DCHECK_EQ((info.host_resolver_flags() &
- ~(HOST_RESOLVER_CANONNAME | HOST_RESOLVER_LOOPBACK_ONLY)), 0)
- << " Unhandled flag";
- AddressList result(ip_number, info.port(),
- (info.host_resolver_flags() & HOST_RESOLVER_CANONNAME));
-
- *addresses = result;
- // Update the net log and notify registered observers.
- OnFinishRequest(net_log, request_id, info, OK,
- 0, /* os_error (unknown since from cache) */
- false /* was_from_cache */);
- return OK;
- }
-
// Build a key that identifies the request in the cache and in the
// outstanding jobs map.
Key key = GetEffectiveKeyForRequest(info);
« no previous file with comments | « net/base/address_list_unittest.cc ('k') | net/base/host_resolver_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698