| Index: libcurl_http_fetcher.h
|
| diff --git a/libcurl_http_fetcher.h b/libcurl_http_fetcher.h
|
| index fd55d8e683dc2c02f1fd88baf8022f6b6e17a4f8..a7799cb007eb4a64b8ec0ff7320d57e5432420d0 100644
|
| --- a/libcurl_http_fetcher.h
|
| +++ b/libcurl_http_fetcher.h
|
| @@ -23,7 +23,7 @@ class LibcurlHttpFetcher : public HttpFetcher {
|
| LibcurlHttpFetcher()
|
| : curl_multi_handle_(NULL), curl_handle_(NULL),
|
| timeout_source_(NULL), transfer_in_progress_(false),
|
| - idle_ms_(1000) {}
|
| + retry_count_(0), idle_ms_(1000) {}
|
|
|
| // Cleans up all internal state. Does not notify delegate
|
| ~LibcurlHttpFetcher();
|
| @@ -73,6 +73,11 @@ class LibcurlHttpFetcher : public HttpFetcher {
|
| static gboolean StaticTimeoutCallback(gpointer data) {
|
| return reinterpret_cast<LibcurlHttpFetcher*>(data)->TimeoutCallback();
|
| }
|
| +
|
| + gboolean RetryTimeoutCallback();
|
| + static gboolean StaticRetryTimeoutCallback(void* arg) {
|
| + return static_cast<LibcurlHttpFetcher*>(arg)->RetryTimeoutCallback();
|
| + }
|
|
|
| // Calls into curl_multi_perform to let libcurl do its work. Returns after
|
| // curl_multi_perform is finished, which may actually be after more than
|
| @@ -123,6 +128,9 @@ class LibcurlHttpFetcher : public HttpFetcher {
|
| // If we resumed an earlier transfer, data offset that we used for the
|
| // new connection. 0 otherwise.
|
| off_t resume_offset_;
|
| +
|
| + // Number of resumes performed.
|
| + int retry_count_;
|
|
|
| long idle_ms_;
|
| DISALLOW_COPY_AND_ASSIGN(LibcurlHttpFetcher);
|
|
|