diff options
author | bengr@chromium.org <bengr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-13 20:08:02 +0000 |
---|---|---|
committer | bengr@chromium.org <bengr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-13 20:08:02 +0000 |
commit | db546e9d54332be583e30a1f0f0a99ba7e6628a2 (patch) | |
tree | 002cd8ba2216e7b9d4f7f842e157af3960d6dc32 /chrome/browser/metrics/metrics_log.h | |
parent | 9b73f4e22f8d431b6608b212684c22338c5d3dc0 (diff) | |
download | chromium_src-db546e9d54332be583e30a1f0f0a99ba7e6628a2.zip chromium_src-db546e9d54332be583e30a1f0f0a99ba7e6628a2.tar.gz chromium_src-db546e9d54332be583e30a1f0f0a99ba7e6628a2.tar.bz2 |
MetricsService API to support synthetic field trials
Extend the MetricsService API to register synthetic field trials, where trial groups map to Chrome configuration states, e.g., values of a preference. These trials are included in UMA reports.
BUG=270275
Review URL: https://codereview.chromium.org/22340005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234881 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/metrics/metrics_log.h')
-rw-r--r-- | chrome/browser/metrics/metrics_log.h | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/chrome/browser/metrics/metrics_log.h b/chrome/browser/metrics/metrics_log.h index fe4b11d..f00d49b 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/browser/metrics/metrics_network_observer.h" #include "chrome/common/metrics/metrics_log_base.h" +#include "chrome/common/metrics/variations/variations_util.h" #include "chrome/installer/util/google_update_settings.h" #include "ui/gfx/size.h" @@ -84,14 +85,15 @@ class MetricsLog : public MetricsLogBase { static const std::string& version_extension(); // Records the current operating environment. Takes the list of installed - // 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. + // plugins, Google Update statistics, and synthetic trial IDs as parameters + // because those can't be obtained synchronously from the UI thread. + // A synthetic trial is one that is set up dynamically by code in Chrome. For + // example, a pref may be mapped to a synthetic trial such that the group + // is determined by the pref value. void RecordEnvironment( const std::vector<content::WebPluginInfo>& plugin_list, const GoogleUpdateMetrics& google_update_metrics, + const std::vector<chrome_variations::ActiveGroupId>& synthetic_trials, base::TimeDelta incremental_uptime); // Records the current operating environment. Takes the list of installed @@ -102,7 +104,8 @@ class MetricsLog : public MetricsLogBase { // upload. void RecordEnvironmentProto( const std::vector<content::WebPluginInfo>& plugin_list, - const GoogleUpdateMetrics& google_update_metrics); + const GoogleUpdateMetrics& google_update_metrics, + const std::vector<chrome_variations::ActiveGroupId>& synthetic_trials); // Records the input text, available choices, and selected entry when the // user uses the Omnibox to open a URL. @@ -124,6 +127,10 @@ class MetricsLog : public MetricsLogBase { const std::vector<content::WebPluginInfo>& plugin_list, base::TimeDelta incremental_uptime); + const base::TimeTicks& creation_time() const { + return creation_time_; + } + protected: // Exposed for the sake of mocking in test code. @@ -201,6 +208,9 @@ class MetricsLog : public MetricsLogBase { // Bluetooth Adapter instance for collecting information about paired devices. scoped_refptr<device::BluetoothAdapter> adapter_; + // The time when the current log was created. + const base::TimeTicks creation_time_; + DISALLOW_COPY_AND_ASSIGN(MetricsLog); }; |