Skip to content

Commit

Permalink
[open tab] Remove minimum query length threshold from provider
Browse files Browse the repository at this point in the history
Having this minimum query length causes a bug: a one character query
will produce a standard web result, and adding a second character will
swap it for an open tab result.

This kind of filtering logic is better done within the launcher ranking
system I think, so this CL removes it from the provider.

Bug: 1293702
Change-Id: Iace2f043407c3e3b6669874f5941982ae22814c9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3529593
Auto-Submit: Tony Yeoman <tby@chromium.org>
Reviewed-by: Orin Jaworski <orinj@chromium.org>
Commit-Queue: Tony Yeoman <tby@chromium.org>
Cr-Commit-Position: refs/heads/main@{#982481}
  • Loading branch information
tby authored and Chromium LUCI CQ committed Mar 17, 2022
1 parent 7ea0c75 commit 27de622
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions components/omnibox/browser/open_tab_provider.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,6 @@ void OpenTabProvider::Start(const AutocompleteInput& input,
}

#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS)
constexpr size_t kMinQueryLength = 2;
if (input.text().length() < kMinQueryLength) {
// Exit early if the query is too short. This is to mitigate a short query
// matching a large volume of results with low confidence.
return;
}

// TODO(crbug.com/1293702): Open tab search is currently implemented using
// the history model to score open tabs. This is an interim implementation,
// which is intended to be replaced with a scoring mechanism using only the
Expand Down

0 comments on commit 27de622

Please sign in to comment.