Commit 56b48e70 authored by Sorin Jianu's avatar Sorin Jianu Committed by Commit Bot

Allow auto-retries on network changed errors in the component updater.

The retries are set to 3, as most of the Chromium code using the
url fetcher does.

Bug: 842364
Change-Id: I0f6e295231c36301c6ca44806233f841d316b58e
Reviewed-on: https://chromium-review.googlesource.com/1056222Reviewed-by: default avatarJoshua Pawlicki <waffles@chromium.org>
Commit-Queue: Sorin Jianu <sorin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558374}
parent bf2bcb36
...@@ -142,6 +142,7 @@ void UrlFetcherDownloader::StartURLFetch(const GURL& url) { ...@@ -142,6 +142,7 @@ void UrlFetcherDownloader::StartURLFetch(const GURL& url) {
net::LOAD_DO_NOT_SAVE_COOKIES | net::LOAD_DO_NOT_SAVE_COOKIES |
net::LOAD_DISABLE_CACHE); net::LOAD_DISABLE_CACHE);
url_fetcher_->SetAutomaticallyRetryOn5xx(false); url_fetcher_->SetAutomaticallyRetryOn5xx(false);
url_fetcher_->SetAutomaticallyRetryOnNetworkChanges(3);
url_fetcher_->SaveResponseToFileAtPath( url_fetcher_->SaveResponseToFileAtPath(
response, base::CreateSequencedTaskRunnerWithTraits(kTaskTraits)); response, base::CreateSequencedTaskRunnerWithTraits(kTaskTraits));
data_use_measurement::DataUseUserData::AttachToFetcher( data_use_measurement::DataUseUserData::AttachToFetcher(
......
...@@ -86,6 +86,7 @@ std::unique_ptr<net::URLFetcher> SendProtocolRequest( ...@@ -86,6 +86,7 @@ std::unique_ptr<net::URLFetcher> SendProtocolRequest(
net::LOAD_DO_NOT_SAVE_COOKIES | net::LOAD_DO_NOT_SAVE_COOKIES |
net::LOAD_DISABLE_CACHE); net::LOAD_DISABLE_CACHE);
url_fetcher->SetAutomaticallyRetryOn5xx(false); url_fetcher->SetAutomaticallyRetryOn5xx(false);
url_fetcher->SetAutomaticallyRetryOnNetworkChanges(3);
for (const auto& header : protocol_request_extra_headers) for (const auto& header : protocol_request_extra_headers)
url_fetcher->AddExtraRequestHeader(base::StringPrintf( url_fetcher->AddExtraRequestHeader(base::StringPrintf(
"%s: %s", header.first.c_str(), header.second.c_str())); "%s: %s", header.first.c_str(), header.second.c_str()));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment