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

Unified Diff: chrome/browser/omnibox/omnibox_field_trial.cc

Issue 446973003: Remove OmniboxHUPCullRedirects and OmniboxHUPCreateShorterMatch trials (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 | « chrome/browser/omnibox/omnibox_field_trial.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/omnibox/omnibox_field_trial.cc
diff --git a/chrome/browser/omnibox/omnibox_field_trial.cc b/chrome/browser/omnibox/omnibox_field_trial.cc
index 165556299b2bc74393f06249eccceb9b9afcd0d8..bef5a8445af2ed6b6f99145ed2c477df085b407b 100644
--- a/chrome/browser/omnibox/omnibox_field_trial.cc
+++ b/chrome/browser/omnibox/omnibox_field_trial.cc
@@ -30,9 +30,6 @@ typedef std::map<std::string, std::string> VariationParams;
typedef HUPScoringParams::ScoreBuckets ScoreBuckets;
// Field trial names.
-const char kHUPCullRedirectsFieldTrialName[] = "OmniboxHUPCullRedirects";
-const char kHUPCreateShorterMatchFieldTrialName[] =
- "OmniboxHUPCreateShorterMatch";
const char kStopTimerFieldTrialName[] = "OmniboxStopTimer";
// The autocomplete dynamic field trial name prefix. Each field trial is
@@ -42,41 +39,6 @@ const char kAutocompleteDynamicFieldTrialPrefix[] = "AutocompleteDynamicTrial_";
// The maximum number of the autocomplete dynamic field trials (aka layers).
const int kMaxAutocompleteDynamicFieldTrials = 5;
-// Field trial experiment probabilities.
-
-// For HistoryURL provider cull redirects field trial, put 0% ( = 0/100 )
-// of the users in the don't-cull-redirects experiment group.
-// TODO(mpearson): Remove this field trial and the code it uses once I'm
-// sure it's no longer needed.
-const base::FieldTrial::Probability kHUPCullRedirectsFieldTrialDivisor = 100;
-const base::FieldTrial::Probability
- kHUPCullRedirectsFieldTrialExperimentFraction = 0;
-
-// For HistoryURL provider create shorter match field trial, put 0%
-// ( = 25/100 ) of the users in the don't-create-a-shorter-match
-// experiment group.
-// TODO(mpearson): Remove this field trial and the code it uses once I'm
-// sure it's no longer needed.
-const base::FieldTrial::Probability
- kHUPCreateShorterMatchFieldTrialDivisor = 100;
-const base::FieldTrial::Probability
- kHUPCreateShorterMatchFieldTrialExperimentFraction = 0;
-
-// Field trial IDs.
-// Though they are not literally "const", they are set only once, in
-// ActivateStaticTrials() below.
-
-// Whether the static field trials have been initialized by
-// ActivateStaticTrials() method.
-bool static_field_trials_initialized = false;
-
-// Field trial ID for the HistoryURL provider cull redirects experiment group.
-int hup_dont_cull_redirects_experiment_group = 0;
-
-// Field trial ID for the HistoryURL provider create shorter match
-// experiment group.
-int hup_dont_create_shorter_match_experiment_group = 0;
-
// Concatenates the autocomplete dynamic field trial prefix with a field trial
// ID to form a complete autocomplete field trial name.
@@ -145,32 +107,6 @@ double HUPScoringParams::ScoreBuckets::HalfLifeTimeDecay(
return pow(2.0, -half_life_intervals);
}
-void OmniboxFieldTrial::ActivateStaticTrials() {
- DCHECK(!static_field_trials_initialized);
-
- // Create the HistoryURL provider cull redirects field trial.
- // Make it expire on March 1, 2013.
- scoped_refptr<base::FieldTrial> trial(
- base::FieldTrialList::FactoryGetFieldTrial(
- kHUPCullRedirectsFieldTrialName, kHUPCullRedirectsFieldTrialDivisor,
- "Standard", 2013, 3, 1, base::FieldTrial::ONE_TIME_RANDOMIZED, NULL));
- hup_dont_cull_redirects_experiment_group =
- trial->AppendGroup("DontCullRedirects",
- kHUPCullRedirectsFieldTrialExperimentFraction);
-
- // Create the HistoryURL provider create shorter match field trial.
- // Make it expire on March 1, 2013.
- trial = base::FieldTrialList::FactoryGetFieldTrial(
- kHUPCreateShorterMatchFieldTrialName,
- kHUPCreateShorterMatchFieldTrialDivisor, "Standard", 2013, 3, 1,
- base::FieldTrial::ONE_TIME_RANDOMIZED, NULL);
- hup_dont_create_shorter_match_experiment_group =
- trial->AppendGroup("DontCreateShorterMatch",
- kHUPCreateShorterMatchFieldTrialExperimentFraction);
-
- static_field_trials_initialized = true;
-}
-
void OmniboxFieldTrial::ActivateDynamicTrials() {
// Initialize all autocomplete dynamic field trials. This method may be
// called multiple times.
@@ -215,35 +151,6 @@ void OmniboxFieldTrial::GetActiveSuggestFieldTrialHashes(
}
}
-bool OmniboxFieldTrial::InHUPCullRedirectsFieldTrial() {
- return base::FieldTrialList::TrialExists(kHUPCullRedirectsFieldTrialName);
-}
-
-bool OmniboxFieldTrial::InHUPCullRedirectsFieldTrialExperimentGroup() {
- if (!base::FieldTrialList::TrialExists(kHUPCullRedirectsFieldTrialName))
- return false;
-
- // Return true if we're in the experiment group.
- const int group = base::FieldTrialList::FindValue(
- kHUPCullRedirectsFieldTrialName);
- return group == hup_dont_cull_redirects_experiment_group;
-}
-
-bool OmniboxFieldTrial::InHUPCreateShorterMatchFieldTrial() {
- return
- base::FieldTrialList::TrialExists(kHUPCreateShorterMatchFieldTrialName);
-}
-
-bool OmniboxFieldTrial::InHUPCreateShorterMatchFieldTrialExperimentGroup() {
- if (!base::FieldTrialList::TrialExists(kHUPCreateShorterMatchFieldTrialName))
- return false;
-
- // Return true if we're in the experiment group.
- const int group = base::FieldTrialList::FindValue(
- kHUPCreateShorterMatchFieldTrialName);
- return group == hup_dont_create_shorter_match_experiment_group;
-}
-
base::TimeDelta OmniboxFieldTrial::StopTimerFieldTrialDuration() {
int stop_timer_ms;
if (base::StringToInt(
« no previous file with comments | « chrome/browser/omnibox/omnibox_field_trial.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698