Commit 6bb38047 authored by mpearson@chromium.org's avatar mpearson@chromium.org

Omnibox: Launch URL Demotion in the Fakebox by Default

This has been approved for launch.

BUG=

Review URL: https://codereview.chromium.org/182313014

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255606 0039d316-1c4b-4281-b951-d872f2087c98
parent 0dc771db
......@@ -322,10 +322,16 @@ void OmniboxFieldTrial::GetDemotionsByType(
AutocompleteInput::PageClassification current_page_classification,
DemotionMultipliers* demotions_by_type) {
demotions_by_type->clear();
const std::string demotion_rule =
OmniboxFieldTrial::GetValueForRuleInContext(
kDemoteByTypeRule,
current_page_classification);
std::string demotion_rule = OmniboxFieldTrial::GetValueForRuleInContext(
kDemoteByTypeRule, current_page_classification);
// If there is no demotion rule for this context, then use the default
// value for that context. At the moment the default value is non-empty
// only for the fakebox-focus context.
if (demotion_rule.empty() &&
(current_page_classification ==
AutocompleteInput::INSTANT_NTP_WITH_FAKEBOX_AS_STARTING_FOCUS))
demotion_rule = "1:61,2:61,3:61,4:61,12:61";
// The value of the DemoteByType rule is a comma-separated list of
// {ResultType + ":" + Number} where ResultType is an AutocompleteMatchType::
// Type enum represented as an integer and Number is an integer number
......
......@@ -216,7 +216,8 @@ class OmniboxFieldTrial {
// 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|.
// appropriately. Otherwise, sets |demotions_by_type| to its default
// value based on the context.
static void GetDemotionsByType(
AutocompleteInput::PageClassification current_page_classification,
DemotionMultipliers* demotions_by_type);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment