| Index: base/metrics/field_trial.h
|
| diff --git a/base/metrics/field_trial.h b/base/metrics/field_trial.h
|
| index 9a7e5d26f25cf7bd3069b7fd2fe4dd65bdf65f1c..2a3b97f602fca4b0b9ffa39999ead8c88be8ffa7 100644
|
| --- a/base/metrics/field_trial.h
|
| +++ b/base/metrics/field_trial.h
|
| @@ -249,7 +249,7 @@ class BASE_EXPORT FieldTrial : public RefCounted<FieldTrial> {
|
| // Ensures that a group is chosen, if it hasn't yet been. The field trial
|
| // might yet be disabled, so this call will *not* notify observers of the
|
| // status.
|
| - void FinalizeGroupChoice();
|
| + void FinalizeGroupChoice(bool is_locked);
|
|
|
| // Returns the trial name and selected group name for this field trial via
|
| // the output parameter |active_group|, but only if the group has already
|
| @@ -266,6 +266,10 @@ class BASE_EXPORT FieldTrial : public RefCounted<FieldTrial> {
|
| // untouched.
|
| bool GetState(State* field_trial_state);
|
|
|
| + // Does the same thing as above, but is deadlock-free if the caller is holding
|
| + // a lock.
|
| + bool GetStateWhileLocked(State* field_trial_state);
|
| +
|
| // Returns the group_name. A winner need not have been chosen.
|
| std::string group_name_internal() const { return group_name_; }
|
|
|
| @@ -517,9 +521,9 @@ class BASE_EXPORT FieldTrialList {
|
| // Remove an observer.
|
| static void RemoveObserver(Observer* observer);
|
|
|
| - // Grabs the lock and adds the field trial to the allocator. This should only
|
| - // be called from FinalizeGroupChoice().
|
| - static void OnGroupFinalized(FieldTrial* field_trial);
|
| + // Grabs the lock if necessary and adds the field trial to the allocator. This
|
| + // should only be called from FinalizeGroupChoice().
|
| + static void OnGroupFinalized(bool is_locked, FieldTrial* field_trial);
|
|
|
| // Notify all observers that a group has been finalized for |field_trial|.
|
| static void NotifyFieldTrialGroupSelection(FieldTrial* field_trial);
|
|
|