update_engine: Set min kernel version based on rollback policy.

- Sets max_kernel_rollforward to tpm_kernver for enterprise enrolled
  devices if number of allowed rollback versions is > 0, or if
  no policy is available.
- Sets max_kernel_rollforward to 0xfffffffe for consumer devices.
- This just holds the rollback window open for enterprise customers
  while the server side piece of the feature is implemented.
- In future max_kernel_rollforward will be set based on the number
  of allowed rollback versions to the lowest version that still
  allows those rollbacks, and will progressively increase as the
  versions age out of the rollback window.

BUG=chromium:814090
TEST=emerges
Change-Id: I7c192092183dd398f74d34b41bbc65dc2595d081
Reviewed-on: https://chromium-review.googlesource.com/940567
Commit-Ready: Zentaro Kavanagh <zentaro@chromium.org>
Tested-by: Zentaro Kavanagh <zentaro@chromium.org>
Reviewed-by: Zentaro Kavanagh <zentaro@chromium.org>
diff --git a/update_manager/rollback_prefs.h b/update_manager/rollback_prefs.h
index 0305a46..1783eb0 100644
--- a/update_manager/rollback_prefs.h
+++ b/update_manager/rollback_prefs.h
@@ -19,6 +19,10 @@
 
 namespace chromeos_update_manager {
 
+// Value used to represent that kernel key versions can always roll-forward.
+// This is the maximum value of a kernel key version.
+constexpr int kRollforwardInfinity = 0xfffffffe;
+
 // Whether the device should roll back to the target version, and if yes, which
 // type of rollback should it do. Matches chrome_device_policy.proto's
 // AutoUpdateSettingsProto::RollbackToTargetVersion.