diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-16 01:37:10 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-16 01:37:10 +0000 |
commit | 51124558810b72b34d23f643a327ea5b2a90ec9f (patch) | |
tree | 43687e1c5e84ce6141b833dd312fdb41ca9d2a22 /views/widget/native_widget_gtk.h | |
parent | 0af8f13ec70d3db6df8bcf308b943dfc5a8f17e7 (diff) | |
download | chromium_src-51124558810b72b34d23f643a327ea5b2a90ec9f.zip chromium_src-51124558810b72b34d23f643a327ea5b2a90ec9f.tar.gz chromium_src-51124558810b72b34d23f643a327ea5b2a90ec9f.tar.bz2 |
Don't autocomplete searches of >1 word if they've only been visited once and the user has not yet typed more than one word.
Subtleties:
* To avoid "crowding out" issues where penalized multiword searches prevent us finding better earlier searches, this gets kMaxMatches * 5 history matches per search provider before trimming to the final list.
* To avoid penalized searches preventing completion of prior searches, or sudden changes of autocompletion when going from one to two words typed, this changes the relevance uniquifying algorithm to first do a stable_sort(). One consequence of this is that we'll now be willing to modify the order of results from history, so e.g. we'll now complete "go" -> "goog" even with a newer history result "google.com" (penalized, looks like URL).
This change also adds AutocompleteResult::kLowestDefaultScore since a lot of files want to do something different for "possibly default" matches versus "guaranteed not to be default". It also refactors search_provider_unittest.cc so I can add a lot of tests without so much boilerplate code.
BUG=79487
TEST=Search for "ghi jkl". Now type that again and notice that it doesn't autocomplete until after "j".
Review URL: http://codereview.chromium.org/7314018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92778 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/widget/native_widget_gtk.h')
0 files changed, 0 insertions, 0 deletions