metricsd: Use the metrics directory everywhere.

Instead of passing different filenames around, only rely on the metrics
directory and infer the filepath from it. This makes testing easier.

BUG: 23939404
TEST: unit tests.

Change-Id: I79086acc3a546464114fa8ec4656ec04e1c43e35
diff --git a/metricsd/metrics_daemon.h b/metricsd/metrics_daemon.h
index 7f7ea63..b363c5e 100644
--- a/metricsd/metrics_daemon.h
+++ b/metricsd/metrics_daemon.h
@@ -50,8 +50,7 @@
             const std::string& scaling_max_freq_path,
             const base::TimeDelta& upload_interval,
             const std::string& server,
-            const std::string& metrics_file,
-            const std::string& config_root);
+            const base::FilePath& metrics_directory);
 
   // Initializes DBus and MessageLoop variables before running the MessageLoop.
   int OnInit() override;
@@ -268,7 +267,7 @@
   bool dbus_enabled_;
 
   // Root of the configuration files to use.
-  std::string config_root_;
+  base::FilePath metrics_directory_;
 
   // The metrics library handle.
   MetricsLibraryInterface* metrics_lib_;
@@ -331,7 +330,6 @@
 
   base::TimeDelta upload_interval_;
   std::string server_;
-  std::string metrics_file_;
 
   scoped_ptr<UploadService> upload_service_;
 };