update_engine: Support milestones to EOL from Omaha

Initiative to show EOL message on Chrome OS devices require that
update_engine parses the fields within Omaha response that pertain to the
new milestones to EOL field. The Omaha response will include a new
field called "milestones_to_eol" which will be an integer value
string.

The job of update_engine when it comes to milestones to EOL from Omaha
is to merely forward. No checks and no modifications of fields are
done within update_engine besides being able to convert the milestones
to EOL from a string to integer.

BUG=chromium:994999
TEST=FEATURES="test" emerge-$BOARD update_engine update_engine-client
TEST=cros deploy $IP update_engine update_engine-client
TEST=test_that -b $BOARD $IP autoupdate_EOL # from Cq-Depend
TEST=test_that -b $BOARD $IP autoupdate_EOL.milestones # from Cq-Depend

Cq-Depend:chromium:1761371
Change-Id: I268e4c8e641b17d6a727a50f53285cc97c76eb22
Reviewed-on: https://chromium-review.googlesource.com/1759285
Tested-by: Jae Hoon Kim <kimjae@chromium.org>
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Nicolas Norvez <norvez@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>
diff --git a/omaha_utils.h b/omaha_utils.h
index 8614540..6000451 100644
--- a/omaha_utils.h
+++ b/omaha_utils.h
@@ -21,6 +21,11 @@
 
 namespace chromeos_update_engine {
 
+// The possible string values for the end-of-life status.
+extern const char kEolStatusSupported[];
+extern const char kEolStatusSecurityOnly[];
+extern const char kEolStatusEol[];
+
 // The end-of-life status of the device.
 enum class EolStatus {
   kSupported = 0,
@@ -28,6 +33,10 @@
   kEol,
 };
 
+using MilestonesToEol = int;
+// The default milestones to EOL.
+extern const MilestonesToEol kMilestonesToEolNone;
+
 // Returns the string representation of the |eol_status|.
 const char* EolStatusToString(EolStatus eol_status);
 
@@ -35,6 +44,14 @@
 // of an invalid string, the default "supported" value will be used instead.
 EolStatus StringToEolStatus(const std::string& eol_status);
 
+// Returns the string representation of the |milestones_to_eol|.
+std::string MilestonesToEolToString(int milestones_to_eol);
+
+// Converts the milestones to EOL string to an |MilestonesToEol| enum class.
+// When the milestones to EOL is not an integer, the default
+// |kMilestonesToEolNone| will be returned.
+MilestonesToEol StringToMilestonesToEol(const std::string& milestones_to_eol);
+
 }  // namespace chromeos_update_engine
 
 #endif  // UPDATE_ENGINE_OMAHA_UTILS_H_