metrics: Add a CLI flag to disable dbus.

DBus is not setup in several targets and the metrics_daemon will crash
if it cannot connect to DBus.
Running metrics daemon without dbus allows us to test the daemon in any
target.

BUG: 22879597

Change-Id: Ica69c8e96c3df794a210a0fa3d44f85a98a660f0
diff --git a/metrics/metrics_daemon.h b/metrics/metrics_daemon.h
index 49e6d70..ccac52a 100644
--- a/metrics/metrics_daemon.h
+++ b/metrics/metrics_daemon.h
@@ -31,6 +31,7 @@
   // Initializes metrics class variables.
   void Init(bool testing,
             bool uploader_active,
+            bool dbus_enabled,
             MetricsLibraryInterface* metrics_lib,
             const std::string& vmstats_path,
             const std::string& cpuinfo_max_freq_path,
@@ -289,6 +290,10 @@
   // Whether the uploader is enabled or disabled.
   bool uploader_active_;
 
+  // Whether or not dbus should be used.
+  // If disabled, we will not collect the frequency of crashes.
+  bool dbus_enabled_;
+
   // Root of the configuration files to use.
   std::string config_root_;