diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-11 01:50:48 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-11 01:50:48 +0000 |
commit | 7e05f6c4baad4f81e06835b83febe2784568ebe1 (patch) | |
tree | e9f7079ff2c42ff257c9dd599d7896a0b7963126 /base/field_trial.cc | |
parent | 26f70b36e14369138eca64b68fca0ee3aa5a9b7a (diff) | |
download | chromium_src-7e05f6c4baad4f81e06835b83febe2784568ebe1.zip chromium_src-7e05f6c4baad4f81e06835b83febe2784568ebe1.tar.gz chromium_src-7e05f6c4baad4f81e06835b83febe2784568ebe1.tar.bz2 |
Disk cache: Generate total-load-time histograms from the
disk cache experiment.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/155380
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20452 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/field_trial.cc')
-rw-r--r-- | base/field_trial.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/base/field_trial.cc b/base/field_trial.cc index 2b354d7..0bf39e2 100644 --- a/base/field_trial.cc +++ b/base/field_trial.cc @@ -67,9 +67,12 @@ std::string FieldTrial::MakeName(const std::string& name_prefix, // static FieldTrialList* FieldTrialList::global_ = NULL; -FieldTrialList::FieldTrialList() - : application_start_time_(Time::Now()) { +// static +bool FieldTrialList::register_without_global_ = false; + +FieldTrialList::FieldTrialList() : application_start_time_(Time::Now()) { DCHECK(!global_); + DCHECK(!register_without_global_); global_ = this; } @@ -86,9 +89,10 @@ FieldTrialList::~FieldTrialList() { // static void FieldTrialList::Register(FieldTrial* trial) { - DCHECK(global_); - if (!global_) + if (!global_) { + register_without_global_ = true; return; + } AutoLock auto_lock(global_->lock_); DCHECK(!global_->PreLockedFind(trial->name())); trial->AddRef(); |