summaryrefslogtreecommitdiffstats
path: root/chrome/browser/metrics/metrics_log.h
diff options
context:
space:
mode:
authorryanmyers@chromium.org <ryanmyers@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-14 23:50:51 +0000
committerryanmyers@chromium.org <ryanmyers@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-14 23:50:51 +0000
commit197c07743ee0b4d614e1dfe4a0dc5ccc1faf9256 (patch)
treedbe02fb1ef4afaf2ade69677d9fcbd1ebdc24880 /chrome/browser/metrics/metrics_log.h
parentca68ee18f2bd69890689b70cc14b2324ef39f29f (diff)
downloadchromium_src-197c07743ee0b4d614e1dfe4a0dc5ccc1faf9256.zip
chromium_src-197c07743ee0b4d614e1dfe4a0dc5ccc1faf9256.tar.gz
chromium_src-197c07743ee0b4d614e1dfe4a0dc5ccc1faf9256.tar.bz2
Add logging of Google Update configuration/statistics to UMA report.
BUG=127279 Review URL: https://chromiumcodereview.appspot.com/10381057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137017 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/metrics/metrics_log.h')
-rw-r--r--chrome/browser/metrics/metrics_log.h41
1 files changed, 34 insertions, 7 deletions
diff --git a/chrome/browser/metrics/metrics_log.h b/chrome/browser/metrics/metrics_log.h
index 1732f03..d7f9c7d 100644
--- a/chrome/browser/metrics/metrics_log.h
+++ b/chrome/browser/metrics/metrics_log.h
@@ -14,6 +14,7 @@
#include "base/basictypes.h"
#include "chrome/common/metrics/metrics_log_base.h"
+#include "chrome/installer/util/google_update_settings.h"
#include "content/public/common/process_type.h"
#include "ui/gfx/size.h"
@@ -36,6 +37,25 @@ namespace webkit {
struct WebPluginInfo;
}
+// This is a small helper struct to pass Google Update metrics in a single
+// reference argument to MetricsLog::RecordEnvironment().
+struct GoogleUpdateMetrics {
+ GoogleUpdateMetrics();
+ ~GoogleUpdateMetrics();
+
+ // Defines whether this is a user-level or system-level install.
+ bool is_system_install;
+ // The time at which Google Update last started an automatic update check.
+ base::Time last_started_au;
+ // The time at which Google Update last successfully recieved update
+ // information from Google servers.
+ base::Time last_checked;
+ // Details about Google Update's attempts to update itself.
+ GoogleUpdateSettings::ProductData google_update_data;
+ // Details about Google Update's attempts to update this product.
+ GoogleUpdateSettings::ProductData product_data;
+};
+
class MetricsLog : public MetricsLogBase {
public:
// Creates a new metrics log
@@ -59,22 +79,25 @@ class MetricsLog : public MetricsLogBase {
static const std::string& version_extension();
// Records the current operating environment. Takes the list of installed
- // plugins as a parameter because that can't be obtained synchronously
- // from the UI thread.
+ // plugins and Google Update statistics as parameters because those can't be
+ // obtained synchronously from the UI thread.
// profile_metrics, if non-null, gives a dictionary of all profile metrics
// that are to be recorded. Each value in profile_metrics should be a
// dictionary giving the metrics for the profile.
void RecordEnvironment(
const std::vector<webkit::WebPluginInfo>& plugin_list,
+ const GoogleUpdateMetrics& google_update_metrics,
const base::DictionaryValue* profile_metrics);
// Records the current operating environment. Takes the list of installed
- // plugins as a parameter because that can't be obtained synchronously from
- // the UI thread. This is exposed as a separate method from the
- // |RecordEnvironment()| method above because we record the environment with
- // *each* protobuf upload, but only with the initial XML upload.
+ // plugins and Google Update statistics as parameters because those can't be
+ // obtained synchronously from the UI thread. This is exposed as a separate
+ // method from the |RecordEnvironment()| method above because we record the
+ // environment with *each* protobuf upload, but only with the initial XML
+ // upload.
void RecordEnvironmentProto(
- const std::vector<webkit::WebPluginInfo>& plugin_list);
+ const std::vector<webkit::WebPluginInfo>& plugin_list,
+ const GoogleUpdateMetrics& google_update_metrics);
// Records the input text, available choices, and selected entry when the
// user uses the Omnibox to open a URL.
@@ -154,6 +177,10 @@ class MetricsLog : public MetricsLogBase {
void WriteProfileMetrics(const std::string& key,
const base::DictionaryValue& profile_metrics);
+ // Writes info about the Google Update install that is managing this client.
+ // This is a no-op if called on a non-Windows platform.
+ void WriteGoogleUpdateProto(const GoogleUpdateMetrics& google_update_metrics);
+
DISALLOW_COPY_AND_ASSIGN(MetricsLog);
};