| Index: chrome/browser/omnibox/omnibox_field_trial.h
|
| diff --git a/chrome/browser/omnibox/omnibox_field_trial.h b/chrome/browser/omnibox/omnibox_field_trial.h
|
| index 1ad3b16f9dd7159d05a04318deb4ee2677f2975d..7bfd2d83eeac28cf166be11879a0180206cc7405 100644
|
| --- a/chrome/browser/omnibox/omnibox_field_trial.h
|
| +++ b/chrome/browser/omnibox/omnibox_field_trial.h
|
| @@ -5,16 +5,23 @@
|
| #ifndef CHROME_BROWSER_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_
|
| #define CHROME_BROWSER_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_
|
|
|
| +#include <map>
|
| #include <string>
|
| #include <vector>
|
|
|
| #include "base/basictypes.h"
|
| #include "base/gtest_prod_util.h"
|
| #include "chrome/browser/autocomplete/autocomplete_input.h"
|
| +#include "chrome/common/autocomplete_match_type.h"
|
|
|
| // This class manages the Omnibox field trials.
|
| class OmniboxFieldTrial {
|
| public:
|
| + // A mapping that contains multipliers indicating that matches of the
|
| + // specified type should have their relevance score multiplied by the
|
| + // given number. Omitted types are assumed to have multipliers of 1.0.
|
| + typedef std::map<AutocompleteMatchType::Type, float> DemotionMultipliers;
|
| +
|
| // Creates the static field trial groups.
|
| // *** MUST NOT BE CALLED MORE THAN ONCE. ***
|
| static void ActivateStaticTrials();
|
| @@ -118,6 +125,18 @@ class OmniboxFieldTrial {
|
| static bool SearchHistoryDisable(
|
| AutocompleteInput::PageClassification current_page_classification);
|
|
|
| + // ---------------------------------------------------------
|
| + // For the DemoteByType experiment that's part of the bundled omnibox field
|
| + // trial.
|
| +
|
| + // If the user is in an experiment group that, in the provided
|
| + // |current_page_classification| context, demotes the relevance scores
|
| + // of certain types of matches, populates the |demotions_by_type| map
|
| + // appropriately. Otherwise, clears |demotions_by_type|.
|
| + static void GetDemotionsByType(
|
| + AutocompleteInput::PageClassification current_page_classification,
|
| + DemotionMultipliers* demotions_by_type);
|
| +
|
| private:
|
| FRIEND_TEST_ALL_PREFIXES(OmniboxFieldTrialTest, GetValueForRuleInContext);
|
|
|
|
|