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/hardware_interface.h b/hardware_interface.h
index 55f19ea..8909058 100644
--- a/hardware_interface.h
+++ b/hardware_interface.h
@@ -22,8 +22,13 @@
   // or something with equivalent funcionality to interpret those.
   virtual const std::string BootDevice() = 0;
 
-  // TODO(deymo): Move other hardware-dependent functions to this interface:
-  // IsNormalBootMode and IsOfficialBuild.
+  // Returns true if this is an official Chrome OS build, false otherwise.
+  virtual bool IsOfficialBuild() = 0;
+
+  // Returns true if the boot mode is normal or if it's unable to
+  // determine the boot mode. Returns false if the boot mode is
+  // developer.
+  virtual bool IsNormalBootMode() = 0;
 
   // Returns the HWID or an empty string on error.
   virtual std::string GetHardwareClass() = 0;