update_engine: Pass is_enterprise_rollback in the StatusResult

Currently Chrome uses some sort of version comparison to define whether
an update is a rollback or not. But that is not very robust. The correct
way is the return this value in the StatusResult. We already have this
value as a placeholder in the update_engine.proto. So this is good to
go.

BUG=chromium:864672
TEST=FEATUERS=test emerge-reef update_engine

Change-Id: I8bd3af0d94abd656dc00a9e67550ea6c6913de91
Reviewed-on: https://chromium-review.googlesource.com/c/aosp/platform/system/update_engine/+/1775116
Tested-by: Amin Hassani <ahassani@chromium.org>
Commit-Queue: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Jae Hoon Kim <kimjae@chromium.org>
diff --git a/update_status_utils.cc b/update_status_utils.cc
index 0758314..639dc8b 100644
--- a/update_status_utils.cc
+++ b/update_status_utils.cc
@@ -33,6 +33,7 @@
 // exactly these matches.
 const char kCurrentOp[] = "CURRENT_OP";
 const char kIsInstall[] = "IS_INSTALL";
+const char kIsEnterpriseRollback[] = "IS_ENTERPRISE_ROLLBACK";
 const char kLastCheckedTime[] = "LAST_CHECKED_TIME";
 const char kNewSize[] = "NEW_SIZE";
 const char kNewVersion[] = "NEW_VERSION";
@@ -88,6 +89,8 @@
 #endif
   key_value_store.SetString(kCurrentOp, UpdateStatusToString(status.status));
   key_value_store.SetString(kNewVersion, status.new_version);
+  key_value_store.SetBoolean(kIsEnterpriseRollback,
+                             status.is_enterprise_rollback);
   key_value_store.SetBoolean(kIsInstall, status.is_install);
 
   return key_value_store.SaveToString();