| Index: components/ntp_snippets/remote/ntp_snippets_fetcher.cc | 
| diff --git a/components/ntp_snippets/remote/ntp_snippets_fetcher.cc b/components/ntp_snippets/remote/ntp_snippets_fetcher.cc | 
| index 62236a8a375cab50981b1a7798b0ce55f963798c..f36ff35e6ec342e5408700404c5b3b98c8af3492 100644 | 
| --- a/components/ntp_snippets/remote/ntp_snippets_fetcher.cc | 
| +++ b/components/ntp_snippets/remote/ntp_snippets_fetcher.cc | 
| @@ -4,6 +4,7 @@ | 
|  | 
| #include "components/ntp_snippets/remote/ntp_snippets_fetcher.h" | 
|  | 
| +#include <algorithm> | 
| #include <cstdlib> | 
| #include <utility> | 
|  | 
| @@ -61,6 +62,9 @@ const char kAuthorizationRequestHeaderFormat[] = "Bearer %s"; | 
| // Variation parameter for personalizing fetching of snippets. | 
| const char kPersonalizationName[] = "fetching_personalization"; | 
|  | 
| +// Variation parameter for disabling the retry. | 
| +const char kBackground5xxRetriesName[] = "background_5xx_retries_count"; | 
| + | 
| // Variation parameter for chrome-content-suggestions backend. | 
| const char kContentSuggestionsBackend[] = "content_suggestions_backend"; | 
|  | 
| @@ -132,6 +136,14 @@ bool IsBooleanParameterEnabled(const std::string& param_name, | 
| return default_value; | 
| } | 
|  | 
| +int Get5xxRetryCount(bool interactive_request) { | 
| +  if (interactive_request) { | 
| +    return 2; | 
| +  } | 
| +  return std::max(0, GetParamAsInt(ntp_snippets::kArticleSuggestionsFeature, | 
| +                                   kBackground5xxRetriesName, 0)); | 
| +} | 
| + | 
| bool UsesChromeContentSuggestionsAPI(const GURL& endpoint) { | 
| if (endpoint == kChromeReaderServer) { | 
| return false; | 
| @@ -812,8 +824,8 @@ NTPSnippetsFetcher::RequestBuilder::BuildURLFetcher( | 
|  | 
| // 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->SetMaxRetriesOn5xx( | 
| +      Get5xxRetryCount(params_.interactive_request)); | 
| return url_fetcher; | 
| } | 
|  | 
|  |