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

Unified Diff: net/base/host_resolver_impl.cc

Issue 11464028: Introduce ERR_NETWORK_CHANGED and allow URLFetcher to automatically retry on that error. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed nits Created 8 years 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') | 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
diff --git a/net/base/host_resolver_impl.cc b/net/base/host_resolver_impl.cc
index b56524ca8ad73ad438b63833e55710d03abeac20..cda3e2f4cb74602bf5866bc2999581ad0ed7c1c9 100644
--- a/net/base/host_resolver_impl.cc
+++ b/net/base/host_resolver_impl.cc
@@ -1267,11 +1267,11 @@ class HostResolverImpl::Job : public PrioritizedDispatcher::Job {
}
}
- // Called from AbortAllInProgressJobs. Completes all requests as aborted
- // and destroys the job.
+ // Called from AbortAllInProgressJobs. Completes all requests and destroys
+ // the job. This currently assumes the abort is due to a network change.
void Abort() {
DCHECK(is_running());
- CompleteRequestsWithError(ERR_ABORTED);
+ CompleteRequestsWithError(ERR_NETWORK_CHANGED);
}
// If DnsTask present, abort it and fall back to ProcTask.
@@ -1531,7 +1531,7 @@ class HostResolverImpl::Job : public PrioritizedDispatcher::Job {
resolver_->received_dns_config_);
}
- bool did_complete = (entry.error != ERR_ABORTED) &&
+ bool did_complete = (entry.error != ERR_NETWORK_CHANGED) &&
(entry.error != ERR_HOST_RESOLVER_QUEUE_TOO_LARGE);
if (did_complete)
resolver_->CacheResult(key_, entry, ttl);
« no previous file with comments | « net/base/host_resolver_impl.h ('k') | net/base/host_resolver_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698