| Index: chrome/browser/metrics/field_trial_synchronizer.cc
|
| diff --git a/chrome/browser/metrics/field_trial_synchronizer.cc b/chrome/browser/metrics/field_trial_synchronizer.cc
|
| index a6ad4c5cff6d8ca223919263e152774fe64e9938..b4833596525734f54b98803f23ced91bcb4048c1 100644
|
| --- a/chrome/browser/metrics/field_trial_synchronizer.cc
|
| +++ b/chrome/browser/metrics/field_trial_synchronizer.cc
|
| @@ -15,19 +15,24 @@
|
|
|
| using content::BrowserThread;
|
|
|
| +namespace {
|
| +
|
| +// This singleton instance should be constructed during the single threaded
|
| +// portion of main(). It initializes globals to provide support for all future
|
| +// calls. This object is created on the UI thread, and it is destroyed after
|
| +// all the other threads have gone away.
|
| +FieldTrialSynchronizer* g_field_trial_synchronizer = NULL;
|
| +
|
| +} // namespace
|
| +
|
| FieldTrialSynchronizer::FieldTrialSynchronizer() {
|
| - DCHECK(field_trial_synchronizer_ == NULL);
|
| - field_trial_synchronizer_ = this;
|
| + DCHECK(g_field_trial_synchronizer == NULL);
|
| + g_field_trial_synchronizer = this;
|
| base::FieldTrialList::AddObserver(this);
|
|
|
| experiments_helper::SetChildProcessLoggingExperimentList();
|
| }
|
|
|
| -FieldTrialSynchronizer::~FieldTrialSynchronizer() {
|
| - base::FieldTrialList::RemoveObserver(this);
|
| - field_trial_synchronizer_ = NULL;
|
| -}
|
| -
|
| void FieldTrialSynchronizer::NotifyAllRenderers(
|
| const std::string& field_trial_name,
|
| const std::string& group_name) {
|
| @@ -55,6 +60,7 @@ void FieldTrialSynchronizer::OnFieldTrialGroupFinalized(
|
| experiments_helper::SetChildProcessLoggingExperimentList();
|
| }
|
|
|
| -// static
|
| -FieldTrialSynchronizer*
|
| - FieldTrialSynchronizer::field_trial_synchronizer_ = NULL;
|
| +FieldTrialSynchronizer::~FieldTrialSynchronizer() {
|
| + base::FieldTrialList::RemoveObserver(this);
|
| + g_field_trial_synchronizer = NULL;
|
| +}
|
|
|