Move IsOOBEComplete to HardwareInterface.
This patch moves the mockable IsOOBEComplete to the HardwareInterface
which already has a fake implemented. This is required as a first
step to make it available on the PolicyManager.
This patch also passes a null pointer when the timestamp isn't
required.
BUG=chromium:358269
TEST=Unittests adjusted and passing.
Change-Id: I620e0f4521832b3f2c0170811116251cdfe58f26
Reviewed-on: https://chromium-review.googlesource.com/193101
Reviewed-by: David Zeuthen <zeuthen@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
diff --git a/mock_hardware.h b/mock_hardware.h
index 6b1da8e..a996896 100644
--- a/mock_hardware.h
+++ b/mock_hardware.h
@@ -37,6 +37,9 @@
ON_CALL(*this, IsNormalBootMode())
.WillByDefault(testing::Invoke(&fake_,
&FakeHardware::IsNormalBootMode));
+ ON_CALL(*this, IsOOBEComplete(testing::_))
+ .WillByDefault(testing::Invoke(&fake_,
+ &FakeHardware::IsOOBEComplete));
ON_CALL(*this, GetHardwareClass())
.WillByDefault(testing::Invoke(&fake_,
&FakeHardware::GetHardwareClass));
@@ -60,6 +63,7 @@
bool(const std::string& kernel_device));
MOCK_CONST_METHOD0(IsOfficialBuild, bool());
MOCK_CONST_METHOD0(IsNormalBootMode, bool());
+ MOCK_CONST_METHOD1(IsOOBEComplete, bool(base::Time* out_time_of_oobe));
MOCK_CONST_METHOD0(GetHardwareClass, std::string());
MOCK_CONST_METHOD0(GetFirmwareVersion, std::string());
MOCK_CONST_METHOD0(GetECVersion, std::string());