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/dbus_service.cc b/dbus_service.cc
index 449c101..42bcfa3 100644
--- a/dbus_service.cc
+++ b/dbus_service.cc
@@ -12,11 +12,12 @@
 
 #include "update_engine/connection_manager.h"
 #include "update_engine/dbus_constants.h"
+#include "update_engine/hardware_interface.h"
 #include "update_engine/marshal.glibmarshal.h"
 #include "update_engine/omaha_request_params.h"
 #include "update_engine/p2p_manager.h"
-#include "update_engine/update_attempter.h"
 #include "update_engine/prefs.h"
+#include "update_engine/update_attempter.h"
 #include "update_engine/utils.h"
 
 using std::set;
@@ -96,7 +97,7 @@
   // Only non-official (e.g., dev and test) builds can override the current
   // version and update server URL over D-Bus. However, pointing to the
   // hardcoded test update server URL is always allowed.
-  if (!chromeos_update_engine::utils::IsOfficialBuild()) {
+  if (!self->system_state_->hardware()->IsOfficialBuild()) {
     if (app_version) {
       update_app_version = app_version;
     }