metrics_daemon: restore correct meaning of Logging.DailyUse.

Maintain separate persistent values for DailyActiveUse and
CumulativeActiveUse.  The latter is used to compute crash rates
relative to active use.

BUG=chromium:364746
TEST=manual

Change-Id: I4d0485016eb49b30a77169ba1cedc1ffbff8810e
Reviewed-on: https://chromium-review.googlesource.com/195698
Reviewed-by: Daniel Erat <derat@chromium.org>
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Tested-by: Luigi Semenzato <semenzato@chromium.org>
Commit-Queue: Luigi Semenzato <semenzato@chromium.org>
diff --git a/metrics/metrics_daemon.h b/metrics/metrics_daemon.h
index 929706a..81e5386 100644
--- a/metrics/metrics_daemon.h
+++ b/metrics/metrics_daemon.h
@@ -175,12 +175,16 @@
 
   // Sends various cumulative kernel crash-related stats, for instance the
   // total number of kernel crashes since the last version update.
-  void SendKernelCrashesCumulativeCountStats(int64 active_time_seconds);
+  void SendKernelCrashesCumulativeCountStats();
 
   // Returns the total (system-wide) CPU usage between the time of the most
   // recent call to this function and now.
   base::TimeDelta GetIncrementalCpuUse();
 
+  // Sends a sample representing the number of seconds of active use
+  // for a 24-hour period.
+  void SendDailyUseSample(const scoped_ptr<PersistentInteger>& use);
+
   // Sends a sample representing a time interval between two crashes of the
   // same type.
   void SendCrashIntervalSample(const scoped_ptr<PersistentInteger>& interval);
@@ -316,7 +320,10 @@
   scoped_ptr<PersistentInteger> weekly_cycle_;
   scoped_ptr<PersistentInteger> version_cycle_;
 
-  scoped_ptr<PersistentInteger> daily_use_;
+  // Active use accumulated in a day.
+  scoped_ptr<PersistentInteger> daily_active_use_;
+  // Active use accumulated since the latest version update.
+  scoped_ptr<PersistentInteger> version_cumulative_active_use_;
 
   // The CPU time accumulator.  This contains the CPU time, in milliseconds,
   // used by the system since the most recent OS version update.