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/update_attempter.cc b/update_attempter.cc
index fb4d223..69a625d 100644
--- a/update_attempter.cc
+++ b/update_attempter.cc
@@ -1084,14 +1084,14 @@
 uint32_t UpdateAttempter::GetErrorCodeFlags()  {
   uint32_t flags = 0;
 
-  if (!utils::IsNormalBootMode())
+  if (!system_state_->hardware()->IsNormalBootMode())
     flags |= kErrorCodeDevModeFlag;
 
   if (response_handler_action_.get() &&
       response_handler_action_->install_plan().is_resume)
     flags |= kErrorCodeResumedFlag;
 
-  if (!utils::IsOfficialBuild())
+  if (!system_state_->hardware()->IsOfficialBuild())
     flags |= kErrorCodeTestImageFlag;
 
   if (omaha_request_params_->update_url() != kProductionOmahaUrl)