Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1054)

Issue 1022643002: Omnibox: Make HUP Scoring More Sane in Prevent-Inline Mode (Closed)

Created:
5 years, 9 months ago by Mark P
Modified:
5 years, 9 months ago
Reviewers:
Peter Kasting
CC:
chromium-reviews, James Su
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Omnibox: Make HUP Scoring Saner in Prevent-Inline Mode In particular, make HistoryURL provider scoring basically the same within regular mode and prevent-inline-autocomplete mode (under the constraint that we always need a valid default match first). For what it's worth, the current code demotes (from ~1410) all non-URL-what-you-typed URLs (non-UWYT) to 900 in prevent-inline-autocomplete mode. If there is a UWYT, though, these results will be clustered / given a free ride to appear right below it, scoring ~1200. After this change, all non-UWYT results will score the same in prevent-inline-autocomplete and normal modes. We instead rely on the allowed_to_be_default_match bit to reorder results as necessary. To implement this feature, we need knowledge of whether the what-you-typed match is reasonable. This change re-adds a variable have_what_you_typed_match to HistoryURLParams. This variable was previously added in https://codereview.chromium.org/347963002 for a field trial and then later removed in https://codereview.chromium.org/879053002 With this variable, the change is straightforward. Don't change the scoring in prevent-inline-autocomplete mode. Instead, simply make sure the what-you-type match gets added to the list in prevent-inline-mode. We add it early on the list (using the Promote() mechanism) so that it'll always appear in the final set of suggestions. Tested using about:omnibox BUG=421772 Committed: https://crrev.com/b457e3280b81672f2d8233f9e801746ad9a82035 Cr-Commit-Position: refs/heads/master@{#322528}

Patch Set 1 #

Patch Set 2 : tweak #

Patch Set 3 : fix typo #

Patch Set 4 : compiles and tested #

Total comments: 10

Patch Set 5 : Peter's comments #

Total comments: 10

Patch Set 6 : Peter's revised comments #

Patch Set 7 : fix & elaborate on tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+85 lines, -25 lines) Patch
M chrome/browser/autocomplete/history_url_provider.h View 1 2 3 4 3 chunks +10 lines, -5 lines 0 comments Download
M chrome/browser/autocomplete/history_url_provider.cc View 1 2 3 4 5 8 chunks +44 lines, -16 lines 0 comments Download
M chrome/browser/autocomplete/history_url_provider_unittest.cc View 1 2 3 4 5 6 2 chunks +31 lines, -4 lines 0 comments Download

Messages

Total messages: 21 (5 generated)
Mark P
Peter, please take a look, thanks.
5 years, 9 months ago (2015-03-20 23:00:45 UTC) #2
Peter Kasting
This should probably get a unittest. https://codereview.chromium.org/1022643002/diff/50001/chrome/browser/autocomplete/history_url_provider.cc File chrome/browser/autocomplete/history_url_provider.cc (right): https://codereview.chromium.org/1022643002/diff/50001/chrome/browser/autocomplete/history_url_provider.cc#newcode778 chrome/browser/autocomplete/history_url_provider.cc:778: db, params->have_what_you_typed_match, params); ...
5 years, 9 months ago (2015-03-20 23:30:19 UTC) #3
Mark P
> This should probably get a unittest. I'm not sure. We generally don't have tests ...
5 years, 9 months ago (2015-03-24 18:23:27 UTC) #4
Peter Kasting
Fair enough on the tests. https://codereview.chromium.org/1022643002/diff/50001/chrome/browser/autocomplete/history_url_provider.cc File chrome/browser/autocomplete/history_url_provider.cc (right): https://codereview.chromium.org/1022643002/diff/50001/chrome/browser/autocomplete/history_url_provider.cc#newcode845 chrome/browser/autocomplete/history_url_provider.cc:845: params.have_what_you_typed_match)) { On 2015/03/24 ...
5 years, 9 months ago (2015-03-24 21:05:40 UTC) #5
Mark P
https://codereview.chromium.org/1022643002/diff/50001/chrome/browser/autocomplete/history_url_provider.cc File chrome/browser/autocomplete/history_url_provider.cc (right): https://codereview.chromium.org/1022643002/diff/50001/chrome/browser/autocomplete/history_url_provider.cc#newcode845 chrome/browser/autocomplete/history_url_provider.cc:845: params.have_what_you_typed_match)) { On 2015/03/24 21:05:39, Peter Kasting wrote: > ...
5 years, 9 months ago (2015-03-24 21:40:50 UTC) #6
Peter Kasting
I think I'm going to want to add/change comments here, but what I do depends ...
5 years, 9 months ago (2015-03-24 22:02:44 UTC) #7
Mark P
https://codereview.chromium.org/1022643002/diff/70001/chrome/browser/autocomplete/history_url_provider.cc File chrome/browser/autocomplete/history_url_provider.cc (right): https://codereview.chromium.org/1022643002/diff/70001/chrome/browser/autocomplete/history_url_provider.cc#newcode805 chrome/browser/autocomplete/history_url_provider.cc:805: } else if (!params->matches.empty() && On 2015/03/24 22:02:43, Peter ...
5 years, 9 months ago (2015-03-24 22:35:46 UTC) #8
Peter Kasting
LGTM https://codereview.chromium.org/1022643002/diff/70001/chrome/browser/autocomplete/history_url_provider.cc File chrome/browser/autocomplete/history_url_provider.cc (right): https://codereview.chromium.org/1022643002/diff/70001/chrome/browser/autocomplete/history_url_provider.cc#newcode805 chrome/browser/autocomplete/history_url_provider.cc:805: } else if (!params->matches.empty() && On 2015/03/24 22:35:46, ...
5 years, 9 months ago (2015-03-24 23:05:19 UTC) #9
Mark P
https://codereview.chromium.org/1022643002/diff/70001/chrome/browser/autocomplete/history_url_provider.cc File chrome/browser/autocomplete/history_url_provider.cc (right): https://codereview.chromium.org/1022643002/diff/70001/chrome/browser/autocomplete/history_url_provider.cc#newcode805 chrome/browser/autocomplete/history_url_provider.cc:805: } else if (!params->matches.empty() && On 2015/03/24 23:05:19, Peter ...
5 years, 9 months ago (2015-03-25 19:04:58 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1022643002/90001
5 years, 9 months ago (2015-03-25 19:05:40 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/1426)
5 years, 9 months ago (2015-03-25 19:45:34 UTC) #15
Mark P
Peter, I had to revise a few tests. In the process, I elaborated on them ...
5 years, 9 months ago (2015-03-25 23:17:56 UTC) #16
Peter Kasting
LGTM (sorry, missed that you'd asked for re-review)
5 years, 9 months ago (2015-03-27 00:48:58 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1022643002/110001
5 years, 9 months ago (2015-03-27 03:20:28 UTC) #19
commit-bot: I haz the power
Committed patchset #7 (id:110001)
5 years, 9 months ago (2015-03-27 04:32:17 UTC) #20
commit-bot: I haz the power
5 years, 9 months ago (2015-03-27 04:33:09 UTC) #21
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/b457e3280b81672f2d8233f9e801746ad9a82035
Cr-Commit-Position: refs/heads/master@{#322528}

Powered by Google App Engine
This is Rietveld 408576698