summaryrefslogtreecommitdiffstats
path: root/chrome/service
diff options
context:
space:
mode:
authorjoaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-14 22:40:42 +0000
committerjoaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-14 22:40:42 +0000
commit7af985a498165e9ba74d7e428be4ffe9a054f053 (patch)
tree88a20282a57a9b0bffc1d99f34e0ba7ae65f4063 /chrome/service
parentab108f2658ea9da9572085ea8bd501505f3f38c5 (diff)
downloadchromium_src-7af985a498165e9ba74d7e428be4ffe9a054f053.zip
chromium_src-7af985a498165e9ba74d7e428be4ffe9a054f053.tar.gz
chromium_src-7af985a498165e9ba74d7e428be4ffe9a054f053.tar.bz2
Introduce ERR_NETWORK_CHANGED and allow URLFetcher to automatically retry on that error.
BUG=164363 Review URL: https://codereview.chromium.org/11464028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173227 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/service')
-rw-r--r--chrome/service/cloud_print/cloud_print_url_fetcher.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/service/cloud_print/cloud_print_url_fetcher.cc b/chrome/service/cloud_print/cloud_print_url_fetcher.cc
index da53bfbf..dc2a468 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 |