update_engine: Do not ignore backoff on test/dev images
Currently we need to automatically try to test backoff scenarios, but the
backoff is disabled by default on test/dev images. This patch adds a check for a
new preference 'no-ignore-backoff' if the image was a non-official build. If the
preference does not exist, the default behavior is achieved, otherwise the
backoff is not being ignored.
BUG=chromium:825065
TEST=unittest
Change-Id: I2fca7e343479274fc9125407d27a4ae84d543641
Reviewed-on: https://chromium-review.googlesource.com/988296
Commit-Ready: Amin Hassani <ahassani@chromium.org>
Tested-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: David Haddock <dhaddock@chromium.org>
Reviewed-by: Sen Jiang <senj@chromium.org>
diff --git a/common/constants.cc b/common/constants.cc
index 6fd373e..d3d851a 100644
--- a/common/constants.cc
+++ b/common/constants.cc
@@ -47,6 +47,7 @@
"metrics-attempt-last-reporting-time";
const char kPrefsMetricsCheckLastReportingTime[] =
"metrics-check-last-reporting-time";
+const char kPrefsNoIgnoreBackoff[] = "no-ignore-backoff";
const char kPrefsNumReboots[] = "num-reboots";
const char kPrefsNumResponsesSeen[] = "num-responses-seen";
const char kPrefsOmahaCohort[] = "omaha-cohort";