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

Unified Diff: chrome/service/cloud_print/cloud_print_url_fetcher.cc

Issue 11464028: Introduce ERR_NETWORK_CHANGED and allow URLFetcher to automatically retry on that error. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed nits Created 8 years 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 | « chrome/browser/translate/translate_manager.cc ('k') | google_apis/gaia/gaia_oauth_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/service/cloud_print/cloud_print_url_fetcher.cc
diff --git a/chrome/service/cloud_print/cloud_print_url_fetcher.cc b/chrome/service/cloud_print/cloud_print_url_fetcher.cc
index da53bfbf1ea9c7e573bd6a4aaa19623abbbc7f9b..dc2a46869f733f1aac4dce371c4c4520e303c0a5 100644
--- a/chrome/service/cloud_print/cloud_print_url_fetcher.cc
+++ b/chrome/service/cloud_print/cloud_print_url_fetcher.cc
@@ -145,11 +145,11 @@ void CloudPrintURLFetcher::OnURLFetchComplete(
// there is no reason to retry, request will never succeed.
// In that case we should call OnRequestGiveUp() right away.
if (source->GetResponseCode() == net::HTTP_UNSUPPORTED_MEDIA_TYPE)
- num_retries_ = source->GetMaxRetries();
+ num_retries_ = source->GetMaxRetriesOn5xx();
++num_retries_;
- if ((-1 != source->GetMaxRetries()) &&
- (num_retries_ > source->GetMaxRetries())) {
+ if ((-1 != source->GetMaxRetriesOn5xx()) &&
+ (num_retries_ > source->GetMaxRetriesOn5xx())) {
// Retry limit reached. Give up.
delegate_->OnRequestGiveUp();
} else {
@@ -178,7 +178,7 @@ void CloudPrintURLFetcher::StartRequestHelper(
request_->SetRequestContext(GetRequestContextGetter());
// Since we implement our own retry logic, disable the retry in URLFetcher.
request_->SetAutomaticallyRetryOn5xx(false);
- request_->SetMaxRetries(max_retries);
+ request_->SetMaxRetriesOn5xx(max_retries);
delegate_ = delegate;
SetupRequestHeaders();
request_->SetLoadFlags(net::LOAD_DO_NOT_SEND_COOKIES |
« no previous file with comments | « chrome/browser/translate/translate_manager.cc ('k') | google_apis/gaia/gaia_oauth_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698