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

Unified Diff: net/url_request/url_request_http_job.h

Issue 10872044: Retry failed network requests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Fix bug Created 8 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/http/http_transaction_unittest.cc ('k') | net/url_request/url_request_http_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_http_job.h
===================================================================
--- net/url_request/url_request_http_job.h (revision 152798)
+++ net/url_request/url_request_http_job.h (working copy)
@@ -64,6 +64,12 @@
void RestartTransactionWithAuth(const AuthCredentials& credentials);
+ void RetryRequestOnError(int result);
+
+ // Returns true if this request should be retried after receiving the given
+ // error as a result of a call to Start.
+ bool ShouldRetryRequest(int result) const;
+
// Overridden from URLRequestJob:
virtual void SetUpload(UploadData* upload) OVERRIDE;
virtual void SetExtraRequestHeaders(
@@ -149,6 +155,8 @@
void RecordTimer();
void ResetTimer();
+ void RecordRetryResult(int result) const;
+
virtual void UpdatePacketReadTimes() OVERRIDE;
void RecordPacketStats(FilterContext::StatisticSelector statistic) const;
@@ -240,6 +248,15 @@
scoped_ptr<HttpTransactionDelegateImpl> http_transaction_delegate_;
+ // True if the request job has automatically retried the request as a result
+ // of an error.
+ bool has_retried_;
+
+ // The network error code error that |this| was automatically retried as a
+ // result of, if any. If this request has not been retried, must be 0.
+ // Reset once it's been used to log histograms.
+ int error_before_retry_;
+
DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob);
};
« no previous file with comments | « net/http/http_transaction_unittest.cc ('k') | net/url_request/url_request_http_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698