Adds check/set for first_active_omaha_ping_sent (from vpd).

first_active_omaha_ping_sent is a boolean in RW_VPD that is checked to
decide whether to send the first active ping (a=-1) to omaha. update_engine
reads its value and sets it to "true" after first active ping is sent or
if the first ping has been sent already and it does not exits in the vpd
(to capture the same feature for older devices).

BUG=chromium:717788
TEST=cros_workon_make --test; Deployed on a device and made sure the
flag is read and writen properly.
CQ-DEPEND=CL:469126

Change-Id: I867d16de1d5d2da4d7a7e1f26aa8e951d90b68f2
Reviewed-on: https://chromium-review.googlesource.com/469107
Commit-Ready: Amin Hassani <[email protected]>
Tested-by: Amin Hassani <[email protected]>
Reviewed-by: Andrew de los Reyes <[email protected]>
diff --git a/common/mock_hardware.h b/common/mock_hardware.h
index 1c4253a..42fa7ba 100644
--- a/common/mock_hardware.h
+++ b/common/mock_hardware.h
@@ -63,6 +63,12 @@
     ON_CALL(*this, GetPowerwashSafeDirectory(testing::_))
       .WillByDefault(testing::Invoke(&fake_,
             &FakeHardware::GetPowerwashSafeDirectory));
+    ON_CALL(*this, GetFirstActiveOmahaPingSent())
+      .WillByDefault(testing::Invoke(&fake_,
+            &FakeHardware::GetFirstActiveOmahaPingSent()));
+    ON_CALL(*this, SetFirstActiveOmahaPingSent())
+      .WillByDefault(testing::Invoke(&fake_,
+            &FakeHardware::SetFirstActiveOmahaPingSent()));
   }
 
   ~MockHardware() override = default;
@@ -78,6 +84,7 @@
   MOCK_CONST_METHOD0(GetPowerwashCount, int());
   MOCK_CONST_METHOD1(GetNonVolatileDirectory, bool(base::FilePath*));
   MOCK_CONST_METHOD1(GetPowerwashSafeDirectory, bool(base::FilePath*));
+  MOCK_CONST_METHOD0(GetFirstActiveOmahaPingSent, bool());
 
   // Returns a reference to the underlying FakeHardware.
   FakeHardware& fake() {