diff options
author | mpearson@chromium.org <mpearson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-07 22:20:09 +0000 |
---|---|---|
committer | mpearson@chromium.org <mpearson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-07 22:20:09 +0000 |
commit | 2450c2dc0d0e5335fe6d35a29d5a550b343c5e42 (patch) | |
tree | 5e2a944af17b21713b1ef2bb5df3f3e45819617a | |
parent | 7bb5a1d600877521ccdc830e57cb697d83921134 (diff) | |
download | chromium_src-2450c2dc0d0e5335fe6d35a29d5a550b343c5e42.zip chromium_src-2450c2dc0d0e5335fe6d35a29d5a550b343c5e42.tar.gz chromium_src-2450c2dc0d0e5335fe6d35a29d5a550b343c5e42.tar.bz2 |
Omnibox: Make Non-Inlineable Results in HQP not Trump Inlineable Ones
(for the HUP-like-scoring field trial)
BUG=180751
TBR=sky@chromium.org
Review URL: https://codereview.chromium.org/12626003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186795 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_field_trial.cc | 2 | ||||
-rw-r--r-- | chrome/browser/history/scored_history_match.cc | 14 |
2 files changed, 15 insertions, 1 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_field_trial.cc b/chrome/browser/autocomplete/autocomplete_field_trial.cc index 00643f8..2e1a35d 100644 --- a/chrome/browser/autocomplete/autocomplete_field_trial.cc +++ b/chrome/browser/autocomplete/autocomplete_field_trial.cc @@ -30,7 +30,7 @@ static const char kHUPCullRedirectsFieldTrialName[] = "OmniboxHUPCullRedirects"; static const char kHUPCreateShorterMatchFieldTrialName[] = "OmniboxHUPCreateShorterMatch"; static const char kHQPReplaceHUPScoringFieldTrialName[] = - "OmniboxHQPReplaceHUPHostFix"; + "OmniboxHQPReplaceHUPProhibitTrumpingInlineableResult"; // The autocomplete dynamic field trial name prefix. Each field trial is // configured dynamically and is retrieved automatically by Chrome during diff --git a/chrome/browser/history/scored_history_match.cc b/chrome/browser/history/scored_history_match.cc index c946861..da19490 100644 --- a/chrome/browser/history/scored_history_match.cc +++ b/chrome/browser/history/scored_history_match.cc @@ -221,6 +221,20 @@ ScoredHistoryMatch::ScoredHistoryMatch(const URLRow& row, raw_score = std::min(kMaxTotalScore, raw_score); } + // TODO(mpearson): Refactor this test to use a new member variable + // |max_assigned_score_for_non_inlineable_results|. + // When doing HUP-like scoring, don't allow a non-inlineable result + // to beat the score of good inlineable results. This is a problem + // because if a non-inlineable result ends up with the highest score + // from HistoryQuick provider, all HistoryQuick results get demoted + // to non-inlineable scores (scores less than 1200). This is a + // problem because there are good inlineable results and they should + // appear with their proper scores, not demoted scores. + if (also_do_hup_like_scoring && !can_inline && + (raw_score >= HistoryURLProvider::kScoreForBestInlineableResult)) { + raw_score = HistoryURLProvider::kScoreForBestInlineableResult - 1; + } + if (also_do_hup_like_scoring && can_inline) { // HistoryURL-provider-like scoring gives any result that is // capable of being inlined a certain minimum score. Some of these |