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

Unified Diff: chrome/common/net/url_fetcher.h

Issue 4194001: Implement exponential back-off mechanism and enforce it at the URLRequestHttpJob level. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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: chrome/common/net/url_fetcher.h
===================================================================
--- chrome/common/net/url_fetcher.h (revision 64189)
+++ chrome/common/net/url_fetcher.h (working copy)
@@ -152,6 +152,10 @@
// after backoff_delay() elapses. URLFetcher has it set to true by default.
void set_automatically_retry_on_5xx(bool retry);
+ int max_retries() const { return max_retries_; }
+
+ void set_max_retries(int max_retries) { max_retries_ = max_retries; }
+
// Returns the back-off delay before the request will be retried,
// when a 5xx response was received.
base::TimeDelta backoff_delay() const { return backoff_delay_; }
@@ -203,6 +207,8 @@
bool automatically_retry_on_5xx_;
// Back-off time delay. 0 by default.
base::TimeDelta backoff_delay_;
+ // Maximum retris allowed.
+ int max_retries_;
static bool g_interception_enabled;

Powered by Google App Engine
This is Rietveld 408576698