Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Unified Diff: chrome/browser/autocomplete/autocomplete_field_trial.cc

Issue 9705074: Supporting command line argument to force field trials (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed some ooopss... Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/metrics/field_trial_unittest.cc ('k') | chrome/browser/chrome_browser_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/autocomplete_field_trial.cc
diff --git a/chrome/browser/autocomplete/autocomplete_field_trial.cc b/chrome/browser/autocomplete/autocomplete_field_trial.cc
index 0b0876a3da1ce75a91b9a4a9b2b696a8ab5e7a68..44ae72977e5ac0ce0dd8e87b1fe14f7fc06eca9d 100644
--- a/chrome/browser/autocomplete/autocomplete_field_trial.cc
+++ b/chrome/browser/autocomplete/autocomplete_field_trial.cc
@@ -64,18 +64,19 @@ void AutocompleteFieldTrial::Activate() {
if (base::FieldTrialList::IsOneTimeRandomizationEnabled()) { // sticky trials
// Create aggressive History URL Provider field trial.
// Make it expire on August 1, 2012.
- scoped_refptr<base::FieldTrial> trial(new base::FieldTrial(
- kAggressiveHUPFieldTrialName, kAggressiveHUPFieldTrialDivisor,
- "Standard", 2012, 8, 1));
+ scoped_refptr<base::FieldTrial> trial(
+ base::FieldTrialList::FactoryGetFieldTrial(
+ kAggressiveHUPFieldTrialName, kAggressiveHUPFieldTrialDivisor,
+ "Standard", 2012, 8, 1, NULL));
trial->UseOneTimeRandomization();
aggressive_hup_experiment_group = trial->AppendGroup("Aggressive",
kAggressiveHUPFieldTrialExperimentFraction);
// Create inline History Quick Provider field trial.
// Make it expire on November 8, 2012.
- trial = new base::FieldTrial(
+ trial = base::FieldTrialList::FactoryGetFieldTrial(
kDisallowInlineHQPFieldTrialName, kDisallowInlineHQPFieldTrialDivisor,
- "Standard", 2012, 11, 8);
+ "Standard", 2012, 11, 8, NULL);
trial->UseOneTimeRandomization();
disallow_inline_hqp_experiment_group = trial->AppendGroup("DisallowInline",
kDisallowInlineHQPFieldTrialExperimentFraction);
@@ -84,9 +85,10 @@ void AutocompleteFieldTrial::Activate() {
// Create the suggest field trial (regardless of sticky-ness status, but
// make it sticky if possible).
// Make it expire on October 1, 2012.
- scoped_refptr<base::FieldTrial> trial(new base::FieldTrial(
- kSuggestFieldTrialName, kSuggestFieldTrialNumberOfGroups,
- "0", 2012, 10, 1));
+ scoped_refptr<base::FieldTrial> trial(
+ base::FieldTrialList::FactoryGetFieldTrial(
+ kSuggestFieldTrialName, kSuggestFieldTrialNumberOfGroups,
+ "0", 2012, 10, 1, NULL));
if (base::FieldTrialList::IsOneTimeRandomizationEnabled())
trial->UseOneTimeRandomization();
// We've already created one group; now just need to create
« no previous file with comments | « base/metrics/field_trial_unittest.cc ('k') | chrome/browser/chrome_browser_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698