Read official-build and dev-mode from the system properties.

This patch determines whether we are running in "dev-mode" and whehter
this is an official build in the "ro.secure" and "ro.debuggable" system
properties.

To reduce excessive logging output, this patch moved the logging of
dev-mode and unofficial builds to the beginning of the program and logs
just once.

Bug: 24077521
Test: Deployed an -eng build, update_engine thinks it is in dev-mode and non-official build.

Change-Id: Ib44823cb27dec3d39e1736d982869742b8211a57
diff --git a/hardware_interface.h b/hardware_interface.h
index df8f227..46dd058 100644
--- a/hardware_interface.h
+++ b/hardware_interface.h
@@ -33,12 +33,15 @@
  public:
   virtual ~HardwareInterface() {}
 
-  // Returns true if this is an official Chrome OS build, false otherwise.
+  // Returns whether this is an official build. Official build means that the
+  // server maintains and updates the build, so update_engine should run and
+  // periodically check for updates.
   virtual bool IsOfficialBuild() const = 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.
+  // developer. A dev-mode boot will allow the user to access developer-only
+  // features.
   virtual bool IsNormalBootMode() const = 0;
 
   // Returns true if the OOBE process has been completed and EULA accepted,