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

Unified Diff: net/base/host_resolver_impl.h

Issue 7011044: Add a command line option to turn off retry attempts to resolve host (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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/base/host_resolver_impl.h
===================================================================
--- net/base/host_resolver_impl.h (revision 85450)
+++ net/base/host_resolver_impl.h (working copy)
@@ -85,6 +85,9 @@
// |max_jobs| specifies the maximum number of threads that the host resolver
// will use (not counting potential duplicate attempts). Use
// SetPoolConstraints() to specify finer-grain settings.
+ // |max_retry_attempts| is the maximum number of times we will retry for host
+ // resolution. Pass HostResolver::kDefaultRetryAttempts to choose a default
+ // value.
//
// For each attempt, we could start another attempt if host is not resolved
// within unresponsive_delay_ time. We keep attempting to resolve the host
@@ -98,6 +101,7 @@
HostResolverImpl(HostResolverProc* resolver_proc,
HostCache* cache,
size_t max_jobs,
+ size_t max_retry_attempts,
NetLog* net_log);
// If any completion callbacks are pending when the resolver is destroyed,
@@ -250,13 +254,21 @@
// NetworkChangeNotifier::IPAddressObserver methods:
virtual void OnIPAddressChanged();
+ // Helper methods to get and set max_retry_attempts_.
+ size_t max_retry_attempts() const {
+ return max_retry_attempts_;
+ }
+ void set_max_retry_attempts(const size_t max_retry_attempts) {
+ max_retry_attempts_ = max_retry_attempts;
+ }
+
// Helper methods for unit tests to get and set unresponsive_delay_.
base::TimeDelta unresponsive_delay() const { return unresponsive_delay_; }
void set_unresponsive_delay(const base::TimeDelta& unresponsive_delay) {
unresponsive_delay_ = unresponsive_delay;
}
- // Helper methods to get and set retry_factor.
+ // Helper methods to get and set retry_factor_.
uint32 retry_factor() const {
return retry_factor_;
}
@@ -283,6 +295,9 @@
// create multiple concurrent resolve attempts for the hostname.
size_t max_jobs_;
+ // Maximum number retry attempts to resolve the hostname.
+ size_t max_retry_attempts_;
+
// This is the limit after which we make another attempt to resolve the host
// if the worker thread has not responded yet. Allow unit tests to change the
// value.

Powered by Google App Engine
This is Rietveld 408576698