update_engine: Parse and supply EOL date for Chrome

From Omaha, the optional field |_eol_date| is to indicate the EOL of a
device. Chrome side will leverage these values to display a
notification. The value for |_eol_date| should be an integer value
indicating the days from Unix Epoch date.

If |_eol_date| does not exist in the Omaha response or have non-integer
values, the default will fallback to |kEolDateInvalid|.

BUG=chromium:998983
TEST=FEATURES="test" emerge-$B update_engine update_engine-client system_api
TEST=test_that -b $B $IP autoupdate_EOL
TEST=test_that -b $B $IP autoupdate_EOL.approaching_eol
TEST=test_that -b $B $IP autoupdate_EOL.future_eol

Cq-Depend:chromium:1783596, chromium:1811116
Change-Id: I2b1063873118ccf8fe22ba09a5961e27aa980c7b
Reviewed-on: https://chromium-review.googlesource.com/1783897
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: Amin Hassani <ahassani@chromium.org>
diff --git a/update_attempter.cc b/update_attempter.cc
index 780ba7b..18e5088 100644
--- a/update_attempter.cc
+++ b/update_attempter.cc
@@ -54,6 +54,7 @@
 #include "update_engine/omaha_request_action.h"
 #include "update_engine/omaha_request_params.h"
 #include "update_engine/omaha_response_handler_action.h"
+#include "update_engine/omaha_utils.h"
 #include "update_engine/p2p_manager.h"
 #include "update_engine/payload_consumer/download_action.h"
 #include "update_engine/payload_consumer/filesystem_verifier_action.h"
@@ -1385,6 +1386,11 @@
   out_status->is_enterprise_rollback =
       install_plan_ && install_plan_->is_rollback;
   out_status->is_install = is_install_;
+
+  string str_eol_date;
+  system_state_->prefs()->GetString(kPrefsOmahaEolDate, &str_eol_date);
+  out_status->eol_date = StringToEolDate(str_eol_date);
+
   return true;
 }