Make HardwareChromeOS own debugd.

It only exists in Chrome OS, Brillo doesn't have it.

Test: ./update_engine_unittests
Bug: 28800946

Change-Id: I49d2024dbad5e0bf78bbc479f97dabb569b32c56
diff --git a/common/fake_hardware.h b/common/fake_hardware.h
index 2da12ad..f7c0286 100644
--- a/common/fake_hardware.h
+++ b/common/fake_hardware.h
@@ -41,6 +41,10 @@
 
   bool IsNormalBootMode() const override { return is_normal_boot_mode_; }
 
+  bool AreDevFeaturesEnabled() const override {
+    return are_dev_features_enabled_;
+  }
+
   bool IsOOBEEnabled() const override { return is_oobe_enabled_; }
 
   bool IsOOBEComplete(base::Time* out_time_of_oobe) const override {
@@ -86,6 +90,10 @@
     is_normal_boot_mode_ = is_normal_boot_mode;
   }
 
+  void SetAreDevFeaturesEnabled(bool are_dev_features_enabled) {
+    are_dev_features_enabled_ = are_dev_features_enabled;
+  }
+
   // Sets the SetIsOOBEEnabled to |is_oobe_enabled|.
   void SetIsOOBEEnabled(bool is_oobe_enabled) {
     is_oobe_enabled_ = is_oobe_enabled;
@@ -120,6 +128,7 @@
  private:
   bool is_official_build_{true};
   bool is_normal_boot_mode_{true};
+  bool are_dev_features_enabled_{false};
   bool is_oobe_enabled_{true};
   bool is_oobe_complete_{true};
   base::Time oobe_timestamp_{base::Time::FromTimeT(1169280000)}; // Jan 20, 2007
diff --git a/common/hardware_interface.h b/common/hardware_interface.h
index f5f900e..316ad3d 100644
--- a/common/hardware_interface.h
+++ b/common/hardware_interface.h
@@ -44,6 +44,9 @@
   // features.
   virtual bool IsNormalBootMode() const = 0;
 
+  // Returns whether the developer features are enabled.
+  virtual bool AreDevFeaturesEnabled() const = 0;
+
   // Returns whether the device has an OOBE flow that the user must go through
   // before getting non-critical updates. Use IsOOBEComplete() to determine if
   // that flow is complete.
diff --git a/common/mock_hardware.h b/common/mock_hardware.h
index 826b3b3..1c4253a 100644
--- a/common/mock_hardware.h
+++ b/common/mock_hardware.h
@@ -36,6 +36,9 @@
     ON_CALL(*this, IsNormalBootMode())
       .WillByDefault(testing::Invoke(&fake_,
             &FakeHardware::IsNormalBootMode));
+    ON_CALL(*this, AreDevFeaturesEnabled())
+      .WillByDefault(testing::Invoke(&fake_,
+            &FakeHardware::AreDevFeaturesEnabled));
     ON_CALL(*this, IsOOBEEnabled())
       .WillByDefault(testing::Invoke(&fake_,
             &FakeHardware::IsOOBEEnabled));