diff options
Diffstat (limited to 'chrome/browser/net')
-rw-r--r-- | chrome/browser/net/url_fetcher.cc | 2 | ||||
-rw-r--r-- | chrome/browser/net/url_fetcher_protect.cc | 4 | ||||
-rw-r--r-- | chrome/browser/net/url_fetcher_protect.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/net/url_fetcher.cc b/chrome/browser/net/url_fetcher.cc index 425cc73..4783aea8 100644 --- a/chrome/browser/net/url_fetcher.cc +++ b/chrome/browser/net/url_fetcher.cc @@ -254,7 +254,7 @@ void URLFetcher::Core::OnCompletedURLRequest(const URLRequestStatus& status) { if (response_code_ >= 500) { // When encountering a server error, we will send the request again // after backoff time. - const int wait = + const int64 wait = protect_entry_->UpdateBackoff(URLFetcherProtectEntry::FAILURE); ++num_retries_; // Restarts the request if we still need to notify the delegate. diff --git a/chrome/browser/net/url_fetcher_protect.cc b/chrome/browser/net/url_fetcher_protect.cc index 22292ab..8798b5a 100644 --- a/chrome/browser/net/url_fetcher_protect.cc +++ b/chrome/browser/net/url_fetcher_protect.cc @@ -52,7 +52,7 @@ URLFetcherProtectEntry::URLFetcherProtectEntry(int sliding_window_period, ResetBackoff(); } -int URLFetcherProtectEntry::UpdateBackoff(EventType event_type) { +int64 URLFetcherProtectEntry::UpdateBackoff(EventType event_type) { // request may be sent in different threads AutoLock lock(lock_); @@ -71,7 +71,7 @@ int URLFetcherProtectEntry::UpdateBackoff(EventType event_type) { NOTREACHED(); } - int wait = static_cast<int>(t.InMilliseconds()); + int64 wait = t.InMilliseconds(); DCHECK(wait >= 0); return wait; } diff --git a/chrome/browser/net/url_fetcher_protect.h b/chrome/browser/net/url_fetcher_protect.h index 7352932..9b121b7 100644 --- a/chrome/browser/net/url_fetcher_protect.h +++ b/chrome/browser/net/url_fetcher_protect.h @@ -53,7 +53,7 @@ class URLFetcherProtectEntry { // the timeout period. It returns the backoff time, in milliseconds, that // indicates to the sender how long should it wait before sending the request. // If the request is allowed to be sent immediately, the backoff time is 0. - int UpdateBackoff(EventType event_type); + int64 UpdateBackoff(EventType event_type); // Returns the max retries allowed. int max_retries() const { |