Increase UMA upload interval, and upload usage stats more often


r=evanm
Review URL: http://codereview.chromium.org/14186

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7165 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/metrics_log.h b/chrome/browser/metrics_log.h
index 225e2a37..84faabe 100644
--- a/chrome/browser/metrics_log.h
+++ b/chrome/browser/metrics_log.h
@@ -70,9 +70,16 @@
   // user uses the Omnibox to open a URL.
   void RecordOmniboxOpenedURL(const AutocompleteLog& log);
 
+  // Record any changes in a given histogram for transmission.
   void RecordHistogramDelta(const Histogram& histogram,
                             const Histogram::SampleSet& snapshot);
 
+  // Record recent delta for critical stability metrics.  We can't wait for a
+  // restart to gather these, as that delay biases our observation away from
+  // users that run happily for a looooong time.  We send increments with each
+  // uma log upload, just as we send histogram data.
+  void RecordIncrementalStabilityElements();
+
   // Stop writing to this record and generate the encoded representation.
   // None of the Record* methods can be called after this is called.
   void CloseLog();
@@ -150,6 +157,14 @@
   // NOTE: Has the side-effect of clearing those counts.
   void WriteStabilityElement();
 
+  // Within the stability group, write required elements.
+  void WriteRequiredStabilityElements(PrefService* pref);
+  // Within the stability group, write elements that need to be updated asap
+  // and can't be delayed until the user decides to restart chromium.
+  // Delaying these stats would bias metrics away from happy long lived
+  // chromium processes (ones that don't crash, and keep on running).
+  void WriteRealtimeStabilityElements(PrefService* pref);
+
   // Writes the list of installed plugins.
   void WritePluginList(const std::vector<WebPluginInfo>& plugin_list);