p2p: Add accounting for p2p usage to PayloadStateInterface
This machinery is needed in order to stop using p2p if the device has
failed to update itself using p2p in a timely manner.
BUG=chromium:260426
TEST=New unit tests + unit tests pass
Change-Id: I9f33309368f8cd5399b9d67c9072a1f78385abc0
Reviewed-on: https://chromium-review.googlesource.com/64827
Reviewed-by: David Zeuthen <zeuthen@chromium.org>
Commit-Queue: David Zeuthen <zeuthen@chromium.org>
Tested-by: David Zeuthen <zeuthen@chromium.org>
diff --git a/constants.cc b/constants.cc
index 31454cc..93dd1e3 100644
--- a/constants.cc
+++ b/constants.cc
@@ -64,5 +64,7 @@
const char kPrefsUpdateTimestampStart[] = "update-timestamp-start";
const char kPrefsUrlSwitchCount[] = "url-switch-count";
const char kPrefsWallClockWaitPeriod[] = "wall-clock-wait-period";
+const char kPrefsP2PNumAttempts[] = "p2p-num-attempts";
+const char kPrefsP2PFirstAttemptTimestamp[] = "p2p-first-attempt-timestamp";
}