Move IsOfficialBuild() and IsNormalBootMode() into HardwareInterface.
This makes the implementation of the two methods part of the
HardwareInterface, so that unit tests won't end up with meaningless
(and unpredictable) calls to the real functions.
BUG=None
TEST=unit tests
Change-Id: Ia23932634124987c1d6ff0683acb15cf4819bc5e
Reviewed-on: https://chromium-review.googlesource.com/175024
Reviewed-by: Chris Sosa <sosa@chromium.org>
Commit-Queue: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
diff --git a/omaha_response_handler_action.cc b/omaha_response_handler_action.cc
index 7921634..4625037 100644
--- a/omaha_response_handler_action.cc
+++ b/omaha_response_handler_action.cc
@@ -146,7 +146,7 @@
// opposed to waiving the checks when we're in dev mode, because we do want
// to enforce the hash checks when our end customers run in dev mode if they
// are using an official build, so that they are protected more.
- if (!utils::IsOfficialBuild()) {
+ if (!system_state_->hardware()->IsOfficialBuild()) {
LOG(INFO) << "Waiving payload hash checks for unofficial builds";
return false;
}