Index: chrome/browser/instant/instant_field_trial.cc |
diff --git a/chrome/browser/instant/instant_field_trial.cc b/chrome/browser/instant/instant_field_trial.cc |
index dee598f66a60cab4444e1bf7412e30a50d7283c4..deec64b852dbbb89b0d1ce85469de3e1d5637384 100644 |
--- a/chrome/browser/instant/instant_field_trial.cc |
+++ b/chrome/browser/instant/instant_field_trial.cc |
@@ -17,6 +17,7 @@ namespace { |
// Field trial IDs of the control and experiment groups. Though they are not |
// literally "const", they are set only once, in Activate() below. See the .h |
// file for what these groups represent. |
+int g_inactive = -1; |
int g_instant = 0; |
int g_suggest = 0; |
int g_hidden = 0; |
@@ -28,7 +29,8 @@ int g_control = 0; |
// static |
void InstantFieldTrial::Activate() { |
scoped_refptr<base::FieldTrial> trial( |
- new base::FieldTrial("Instant", 1000, "Inactive", 2013, 7, 1)); |
+ base::FieldTrialList::GetFieldTrialInstance( |
+ "Instant", 1000, "Inactive", &g_inactive, 2013, 7, 1)); |
// Try to give the user a consistent experience, if possible. |
if (base::FieldTrialList::IsOneTimeRandomizationEnabled()) |
@@ -62,7 +64,7 @@ InstantFieldTrial::Group InstantFieldTrial::GetGroup(Profile* profile) { |
const int group = base::FieldTrialList::FindValue("Instant"); |
if (group == base::FieldTrial::kNotFinalized || |
- group == base::FieldTrial::kDefaultGroupNumber) { |
+ group == g_inactive) { |
return INACTIVE; |
} |