update_engine: Share payloads for a maximum of five days only.

This helps limit exposure of what version the device may or may not be
running.

BUG=chromium:424823
TEST=New unit test + unit tests pass.

Change-Id: I9db6f8d560e359c2b8a65d1381dc44320ed4b3a1
Reviewed-on: https://chromium-review.googlesource.com/227592
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Tested-by: David Zeuthen <zeuthen@chromium.org>
Commit-Queue: David Zeuthen <zeuthen@chromium.org>
diff --git a/constants.h b/constants.h
index 05909fa..0f200cb 100644
--- a/constants.h
+++ b/constants.h
@@ -113,6 +113,9 @@
 // The maximum number of payload files to keep in /var/cache/p2p.
 const int kMaxP2PFilesToKeep = 3;
 
+// The maximum number of days to keep a p2p file;
+const int kMaxP2PFileAgeDays = 5;
+
 // The default number of UMA buckets for metrics.
 const int kNumDefaultUmaBuckets = 50;