diff options
author | joi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-05 02:22:11 +0000 |
---|---|---|
committer | joi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-05 02:22:11 +0000 |
commit | 780702c2aac603a5ca09c22e34d3f913a375627d (patch) | |
tree | 9eec20da47f64859a072a8ca2ca03823953e5d52 /chrome/browser/metrics | |
parent | 8dc0234a8d2cec8bb1979ec8dec05bf23a79a42a (diff) | |
download | chromium_src-780702c2aac603a5ca09c22e34d3f913a375627d.zip chromium_src-780702c2aac603a5ca09c22e34d3f913a375627d.tar.gz chromium_src-780702c2aac603a5ca09c22e34d3f913a375627d.tar.bz2 |
Add one-time randomization support for FieldTrial, and the ability to
disable field trials. I am going to have a need for both soon.
Cleaning up some comments about empty trial names, adding static
method TrialExists() and simplifying many call sites by using this
method.
While I'm in there and needing base/OWNERS approval, add an OWNERS
file for base/metrics that adds jar@chromium.org as an owner for that
directory.
BUG=none
TEST=base_unittests
TBR=jam@chromium.org
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84197 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/metrics')
-rw-r--r-- | chrome/browser/metrics/metrics_service.cc | 4 | ||||
-rw-r--r-- | chrome/browser/metrics/metrics_service.h | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/metrics/metrics_service.cc b/chrome/browser/metrics/metrics_service.cc index 11f61bc..2e3ccd8 100644 --- a/chrome/browser/metrics/metrics_service.cc +++ b/chrome/browser/metrics/metrics_service.cc @@ -471,6 +471,10 @@ void MetricsService::Stop() { SetRecording(false); } +std::string MetricsService::GetClientId() { + return client_id_; +} + void MetricsService::SetRecording(bool enabled) { DCHECK(IsSingleThreaded()); diff --git a/chrome/browser/metrics/metrics_service.h b/chrome/browser/metrics/metrics_service.h index 6acb6a2..b2b4ac3 100644 --- a/chrome/browser/metrics/metrics_service.h +++ b/chrome/browser/metrics/metrics_service.h @@ -82,6 +82,10 @@ class MetricsService : public NotificationObserver, void StartRecordingOnly(); void Stop(); + // Returns the client ID for this client, or the empty string if metrics + // recording is not currently running. + std::string GetClientId(); + // At startup, prefs needs to be called with a list of all the pref names and // types we'll be using. static void RegisterPrefs(PrefService* local_state); |