update_engine: Report VPD write failure to UMA

Currently we see many first actives to come from non-FSI images. But we have not
been able to figure out why. This CL, reports a new error
kFirstActiveOmahaPingSentPersistenceError when writing the first active omaha
flag into VPD fails. This allows us to see if that is the actual cause of the
problem.

CL:1062659 adds the enum value on the Chrome side.

BUG=chromium:833980
TEST=unittests
TEST=precq

Change-Id: I65e233c5f895489ba905494fb20d7b00d0c4af10
Reviewed-on: https://chromium-review.googlesource.com/1062662
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
diff --git a/hardware_chromeos.cc b/hardware_chromeos.cc
index c0f2b67..08303d0 100644
--- a/hardware_chromeos.cc
+++ b/hardware_chromeos.cc
@@ -287,7 +287,7 @@
   return static_cast<bool>(active_ping);
 }
 
-void HardwareChromeOS::SetFirstActiveOmahaPingSent() {
+bool HardwareChromeOS::SetFirstActiveOmahaPingSent() {
   int exit_code = 0;
   string output;
   vector<string> vpd_set_cmd = {
@@ -297,7 +297,7 @@
     LOG(ERROR) << "Failed to set vpd key for " << kActivePingKey
                << " with exit code: " << exit_code
                << " with error: " << output;
-    return;
+    return false;
   }
 
   vector<string> vpd_dump_cmd = { "dump_vpd_log", "--force" };
@@ -306,7 +306,9 @@
     LOG(ERROR) << "Failed to cache " << kActivePingKey<< " using dump_vpd_log"
                << " with exit code: " << exit_code
                << " with error: " << output;
+    return false;
   }
+  return true;
 }
 
 }  // namespace chromeos_update_engine