| Index: components/quirks/quirks_client.cc
|
| diff --git a/components/quirks/quirks_client.cc b/components/quirks/quirks_client.cc
|
| index 383c91126a6c7bfd254c38dbb54187ce3fe06901..17ca7416e25e825b3f16750711341fd99b8e09b9 100644
|
| --- a/components/quirks/quirks_client.cc
|
| +++ b/components/quirks/quirks_client.cc
|
| @@ -25,6 +25,8 @@ const char kQuirksUrlFormat[] =
|
| "https://chromeosquirksserver-pa.googleapis.com/v2/display/%s/clients"
|
| "/chromeos/M%d";
|
|
|
| +const int kMaxServerFailures = 10;
|
| +
|
| const net::BackoffEntry::Policy kDefaultBackoffPolicy = {
|
| 1, // Initial errors before applying backoff
|
| 10000, // 10 seconds.
|
| @@ -111,6 +113,12 @@ void QuirksClient::OnURLFetchComplete(const net::URLFetcher* source) {
|
| }
|
|
|
| if (server_error) {
|
| + if (backoff_entry_.failure_count() >= kMaxServerFailures) {
|
| + // After 10 retires (5+ hours), give up, and try again in a month.
|
| + VLOG(1) << "Too many retries; Quirks Client shutting down.";
|
| + Shutdown(false);
|
| + return;
|
| + }
|
| url_fetcher_.reset();
|
| Retry();
|
| return;
|
|
|