Index: base/metrics/field_trial.cc |
=================================================================== |
--- base/metrics/field_trial.cc (revision 166931) |
+++ base/metrics/field_trial.cc (working copy) |
@@ -145,7 +145,8 @@ |
int FieldTrial::group() { |
FinalizeGroupChoice(); |
if (!group_reported_) { |
- FieldTrialList::NotifyFieldTrialGroupSelection(name_, group_name_); |
+ if (enable_field_trial_) |
Ilya Sherman
2012/11/09 22:45:59
optional nit: Maybe combine this with the if-stmt
Alexei Svitkine (slow)
2012/11/09 23:42:39
I thought of that, but then |group_reported_| woul
|
+ FieldTrialList::NotifyFieldTrialGroupSelection(name_, group_name_); |
group_reported_ = true; |
} |
return group_; |
@@ -209,7 +210,7 @@ |
} |
bool FieldTrial::GetActiveGroup(ActiveGroup* active_group) const { |
- if (!group_reported_) |
+ if (!group_reported_ || !enable_field_trial_) |
return false; |
DCHECK_NE(group_, kNotFinalized); |
active_group->trial = name_; |