metrics: replace "Logging.*" with "Platform.*"

"Logging.*" is not a good name.
Also remove unused function ReportDailyUse().

BUG=chromium:508535
TEST=it compiles

Change-Id: I070bada4857abd80989ecc746adcbf1dcf6239a3
Reviewed-on: https://chromium-review.googlesource.com/284610
Tested-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Commit-Queue: Luigi Semenzato <semenzato@chromium.org>
diff --git a/metrics/README b/metrics/README
index 6150dc7..4b92af3 100644
--- a/metrics/README
+++ b/metrics/README
@@ -52,7 +52,7 @@
 
 Use TrackerArea.MetricName. For example:
 
-Logging.CrashCounter
+Platform.DailyUseTime
 Network.TimeToDrop
 
 
diff --git a/metrics/metrics_daemon.cc b/metrics/metrics_daemon.cc
index 9568592..880e90c 100644
--- a/metrics/metrics_daemon.cc
+++ b/metrics/metrics_daemon.cc
@@ -243,37 +243,37 @@
   ticks_per_second_ = sysconf(_SC_CLK_TCK);
 
   daily_active_use_.reset(
-      new PersistentInteger("Logging.DailyUseTime"));
+      new PersistentInteger("Platform.DailyUseTime"));
   version_cumulative_active_use_.reset(
-      new PersistentInteger("Logging.CumulativeDailyUseTime"));
+      new PersistentInteger("Platform.CumulativeDailyUseTime"));
   version_cumulative_cpu_use_.reset(
-      new PersistentInteger("Logging.CumulativeCpuTime"));
+      new PersistentInteger("Platform.CumulativeCpuTime"));
 
   kernel_crash_interval_.reset(
-      new PersistentInteger("Logging.KernelCrashInterval"));
+      new PersistentInteger("Platform.KernelCrashInterval"));
   unclean_shutdown_interval_.reset(
-      new PersistentInteger("Logging.UncleanShutdownInterval"));
+      new PersistentInteger("Platform.UncleanShutdownInterval"));
   user_crash_interval_.reset(
-      new PersistentInteger("Logging.UserCrashInterval"));
+      new PersistentInteger("Platform.UserCrashInterval"));
 
   any_crashes_daily_count_.reset(
-      new PersistentInteger("Logging.AnyCrashesDaily"));
+      new PersistentInteger("Platform.AnyCrashesDaily"));
   any_crashes_weekly_count_.reset(
-      new PersistentInteger("Logging.AnyCrashesWeekly"));
+      new PersistentInteger("Platform.AnyCrashesWeekly"));
   user_crashes_daily_count_.reset(
-      new PersistentInteger("Logging.UserCrashesDaily"));
+      new PersistentInteger("Platform.UserCrashesDaily"));
   user_crashes_weekly_count_.reset(
-      new PersistentInteger("Logging.UserCrashesWeekly"));
+      new PersistentInteger("Platform.UserCrashesWeekly"));
   kernel_crashes_daily_count_.reset(
-      new PersistentInteger("Logging.KernelCrashesDaily"));
+      new PersistentInteger("Platform.KernelCrashesDaily"));
   kernel_crashes_weekly_count_.reset(
-      new PersistentInteger("Logging.KernelCrashesWeekly"));
+      new PersistentInteger("Platform.KernelCrashesWeekly"));
   kernel_crashes_version_count_.reset(
-      new PersistentInteger("Logging.KernelCrashesSinceUpdate"));
+      new PersistentInteger("Platform.KernelCrashesSinceUpdate"));
   unclean_shutdowns_daily_count_.reset(
-      new PersistentInteger("Logging.UncleanShutdownsDaily"));
+      new PersistentInteger("Platform.UncleanShutdownsDaily"));
   unclean_shutdowns_weekly_count_.reset(
-      new PersistentInteger("Logging.UncleanShutdownsWeekly"));
+      new PersistentInteger("Platform.UncleanShutdownsWeekly"));
 
   daily_cycle_.reset(new PersistentInteger("daily.cycle"));
   weekly_cycle_.reset(new PersistentInteger("weekly.cycle"));
@@ -1039,18 +1039,6 @@
   return true;
 }
 
-void MetricsDaemon::ReportDailyUse(int use_seconds) {
-  if (use_seconds <= 0)
-    return;
-
-  int minutes = (use_seconds + kSecondsPerMinute / 2) / kSecondsPerMinute;
-  SendSample("Logging.DailyUseTime",
-             minutes,
-             1,
-             kMinutesPerDay * 30 * 2,  // cumulative---two months worth
-             50);
-}
-
 void MetricsDaemon::SendSample(const string& name, int sample,
                                int min, int max, int nbuckets) {
   metrics_lib_->SendToUMA(name, sample, min, max, nbuckets);
diff --git a/metrics/metrics_daemon.h b/metrics/metrics_daemon.h
index d38dcd9..b1b2d11 100644
--- a/metrics/metrics_daemon.h
+++ b/metrics/metrics_daemon.h
@@ -75,7 +75,6 @@
   FRIEND_TEST(MetricsDaemonTest, ProcessUserCrash);
   FRIEND_TEST(MetricsDaemonTest, ReportCrashesDailyFrequency);
   FRIEND_TEST(MetricsDaemonTest, ReadFreqToInt);
-  FRIEND_TEST(MetricsDaemonTest, ReportDailyUse);
   FRIEND_TEST(MetricsDaemonTest, ReportDiskStats);
   FRIEND_TEST(MetricsDaemonTest, ReportKernelCrashInterval);
   FRIEND_TEST(MetricsDaemonTest, ReportUncleanShutdownInterval);
@@ -179,9 +178,6 @@
   // exists, so it must not be called more than once.
   bool CheckSystemCrash(const std::string& crash_file);
 
-  // Report daily use through UMA.
-  void ReportDailyUse(int use_seconds);
-
   // Sends a regular (exponential) histogram sample to Chrome for
   // transport to UMA. See MetricsLibrary::SendToUMA in
   // metrics_library.h for a description of the arguments.
diff --git a/metrics/metrics_daemon_test.cc b/metrics/metrics_daemon_test.cc
index 3055013..7dafbd6 100644
--- a/metrics/metrics_daemon_test.cc
+++ b/metrics/metrics_daemon_test.cc
@@ -212,18 +212,6 @@
   base::DeleteFile(crash_detected, false);
 }
 
-TEST_F(MetricsDaemonTest, ReportDailyUse) {
-  ExpectSample("Logging.DailyUseTime", 2);
-  daemon_.ReportDailyUse(90);
-
-  ExpectSample("Logging.DailyUseTime", 1);
-  daemon_.ReportDailyUse(89);
-
-  // There should be no metrics generated for the calls below.
-  daemon_.ReportDailyUse(0);
-  daemon_.ReportDailyUse(-5);
-}
-
 TEST_F(MetricsDaemonTest, MessageFilter) {
   // Ignore calls to SendToUMA.
   EXPECT_CALL(metrics_lib_, SendToUMA(_, _, _, _, _)).Times(AnyNumber());