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/client_library/client_dbus.cc b/client_library/client_dbus.cc
index e2defe7..d0f7f81 100644
--- a/client_library/client_dbus.cc
+++ b/client_library/client_dbus.cc
@@ -270,8 +270,9 @@
   return proxy_->GetLastAttemptError(last_attempt_error, nullptr);
 }
 
-bool DBusUpdateEngineClient::GetEolStatus(int32_t* eol_status) const {
-  return proxy_->GetEolStatus(eol_status, nullptr);
+bool DBusUpdateEngineClient::GetEolStatus(int32_t* eol_status,
+                                          int32_t* milestones_to_eol) const {
+  return proxy_->GetEolStatus(eol_status, milestones_to_eol, nullptr);
 }
 
 }  // namespace internal
diff --git a/client_library/client_dbus.h b/client_library/client_dbus.h
index c9631cf..3f782e9 100644
--- a/client_library/client_dbus.h
+++ b/client_library/client_dbus.h
@@ -85,7 +85,8 @@
 
   bool GetLastAttemptError(int32_t* last_attempt_error) const override;
 
-  bool GetEolStatus(int32_t* eol_status) const override;
+  bool GetEolStatus(int32_t* eol_status,
+                    int32_t* milestones_to_eol) const override;
 
  private:
   void DBusStatusHandlersRegistered(const std::string& interface,
diff --git a/client_library/include/update_engine/client.h b/client_library/include/update_engine/client.h
index 89f36af..65a3267 100644
--- a/client_library/include/update_engine/client.h
+++ b/client_library/include/update_engine/client.h
@@ -135,8 +135,10 @@
   // Get the last UpdateAttempt error code.
   virtual bool GetLastAttemptError(int32_t* last_attempt_error) const = 0;
 
-  // Get the current end-of-life status code. See EolStatus enum for details.
-  virtual bool GetEolStatus(int32_t* eol_status) const = 0;
+  // Get the current end-of-life status code and milestones to end-of-life.
+  // See |EolStatus| enum and |MilestonesToEol| enum for details.
+  virtual bool GetEolStatus(int32_t* eol_status,
+                            int32_t* milestones_to_eol) const = 0;
 
  protected:
   // Use CreateInstance().