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

Unified Diff: components/ntp_snippets/ntp_snippets_fetcher.cc

Issue 1789513003: Downloading the json file from ChromeReader is tried several times when ERR_NETW… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fetcher-sign-in
Patch Set: Rebase Created 4 years, 9 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ntp_snippets/ntp_snippets_fetcher.cc
diff --git a/components/ntp_snippets/ntp_snippets_fetcher.cc b/components/ntp_snippets/ntp_snippets_fetcher.cc
index 3d62cc396d53788a1e664eb0e3b33641fbc309a8..7c820ae75c79d3f225ce99664a2f6aff7aa2aca6 100644
--- a/components/ntp_snippets/ntp_snippets_fetcher.cc
+++ b/components/ntp_snippets/ntp_snippets_fetcher.cc
@@ -121,6 +121,11 @@ void NTPSnippetsFetcher::OnGetTokenSuccess(
url_fetcher_->SetUploadData("application/json",
base::StringPrintf(kRequestParameterFormat,
host_restricts.c_str()));
+
+ // Fetchers are sometimes cancelled because a network change was detected.
+ url_fetcher_->SetAutomaticallyRetryOnNetworkChanges(3);
+ // Try to make fetching the files bit more robust even with poor connection.
+ url_fetcher_->SetMaxRetriesOn5xx(3);
url_fetcher_->Start();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698