Chromium Code Reviews| 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 df384ddb1cca19bcd708263430ec8e1a24a0aab1..4b136b29deb699c40b5c8f802d308229635501d9 100644 |
| --- a/components/ntp_snippets/ntp_snippets_fetcher.cc |
| +++ b/components/ntp_snippets/ntp_snippets_fetcher.cc |
| @@ -70,6 +70,14 @@ void NTPSnippetsFetcher::FetchSnippets() { |
| url_fetcher_->SetUploadData("application/json", |
| kUnpersonalizedRequestParameters); |
| url_fetcher_->SaveResponseToTemporaryFile(file_task_runner_.get()); |
| + |
| + // Fetchers are sometimes cancelled because a network change was detected, |
| + // especially at startup and after sign-in on ChromeOS. Retrying once should |
|
Marc Treib
2016/03/23 11:50:08
I would remove everything after the first line her
jkrcal
2016/03/23 21:10:28
Done.
|
| + // be enough in those cases; let the fetcher retry up to 3 times just in case. |
| + // http://crbug.com/163710 |
| + url_fetcher_->SetAutomaticallyRetryOnNetworkChanges(3); |
| + // Enable fetching the files properly even with poor connection |
|
Marc Treib
2016/03/23 11:50:08
This is IMO a bit too generic - it's more "try to
jkrcal
2016/03/23 21:10:28
Done.
|
| + url_fetcher_->SetMaxRetriesOn5xx(3); |
| url_fetcher_->Start(); |
| } |