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 50b8701334f6903ba2efe80dcc29223238cffee9..12aa9813581103a2414286059e3bab87a5746524 100644 |
--- a/chrome/browser/omnibox/omnibox_field_trial.h |
+++ b/chrome/browser/omnibox/omnibox_field_trial.h |
@@ -6,6 +6,7 @@ |
#define CHROME_BROWSER_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_ |
#include <map> |
+#include <set> |
#include <string> |
#include <vector> |
@@ -22,6 +23,9 @@ class OmniboxFieldTrial { |
// given number. Omitted types are assumed to have multipliers of 1.0. |
typedef std::map<AutocompleteMatchType::Type, float> DemotionMultipliers; |
+ // A set of types that should not be demoted when they are the top match. |
+ typedef std::set<AutocompleteMatchType::Type> UndemotableTopMatchTypes; |
+ |
// Creates the static field trial groups. |
// *** MUST NOT BE CALLED MORE THAN ONCE. *** |
static void ActivateStaticTrials(); |
@@ -148,6 +152,12 @@ class OmniboxFieldTrial { |
AutocompleteInput::PageClassification current_page_classification, |
DemotionMultipliers* demotions_by_type); |
+ // Get the set of types that should not be demoted if they are the top |
+ // match. |
+ static void GetUndemotableTopTypes( |
+ AutocompleteInput::PageClassification current_page_classification, |
+ UndemotableTopMatchTypes* undemotable_types); |
+ |
// --------------------------------------------------------- |
// For the ReorderForLegalDefaultMatch experiment that's part of the |
// bundled omnibox field trial. |
@@ -168,6 +178,7 @@ class OmniboxFieldTrial { |
static const char kShortcutsScoringMaxRelevanceRule[]; |
static const char kSearchHistoryRule[]; |
static const char kDemoteByTypeRule[]; |
+ static const char kUndemotableTopTypeRule[]; |
static const char kReorderForLegalDefaultMatchRule[]; |
// Rule values. |
static const char kReorderForLegalDefaultMatchRuleEnabled[]; |