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..490e7b2cf6ee8a0c18a8f984524b783e6b2ecad5 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> DemotionMultiplierByType; |
Peter Kasting
2013/08/06 19:33:50
Nit: "DemotionMultipliers" seems pretty clear too,
Mark P
2013/08/06 22:00:15
Done.
Mark P
2013/08/06 22:00:15
Done. Changes a variable name or two as appropria
|
+ |
// 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, populate the |demotions_by_type| map |
Peter Kasting
2013/08/06 19:33:50
Nit: populate -> populates
Mark P
2013/08/06 22:00:15
Done.
|
+ // appropriately. Otherwise, clear |demotions_by_type|. |
Peter Kasting
2013/08/06 19:33:50
Nit: clear -> clears
Mark P
2013/08/06 22:00:15
Done.
|
+ static void GetDemotionsByType( |
+ AutocompleteInput::PageClassification current_page_classification, |
+ DemotionMultiplierByType* demotions_by_type); |
+ |
private: |
FRIEND_TEST_ALL_PREFIXES(OmniboxFieldTrialTest, GetValueForRuleInContext); |