| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/metrics/field_trial.h" | 5 #include "base/metrics/field_trial.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/build_time.h" | 9 #include "base/build_time.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 631 return it->second; | 631 return it->second; |
| 632 } | 632 } |
| 633 | 633 |
| 634 // static | 634 // static |
| 635 void FieldTrialList::Register(FieldTrial* trial) { | 635 void FieldTrialList::Register(FieldTrial* trial) { |
| 636 if (!global_) { | 636 if (!global_) { |
| 637 used_without_global_ = true; | 637 used_without_global_ = true; |
| 638 return; | 638 return; |
| 639 } | 639 } |
| 640 AutoLock auto_lock(global_->lock_); | 640 AutoLock auto_lock(global_->lock_); |
| 641 DCHECK(!global_->PreLockedFind(trial->trial_name())); | 641 CHECK(!global_->PreLockedFind(trial->trial_name())) << trial->trial_name(); |
| 642 trial->AddRef(); | 642 trial->AddRef(); |
| 643 trial->SetTrialRegistered(); | 643 trial->SetTrialRegistered(); |
| 644 global_->registered_[trial->trial_name()] = trial; | 644 global_->registered_[trial->trial_name()] = trial; |
| 645 } | 645 } |
| 646 | 646 |
| 647 } // namespace base | 647 } // namespace base |
| OLD | NEW |