-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Omnibox] Local history suggest revamp (part 1)
Based on the proposal in go/chrome-local-history-suggest-revamp, this CL introduces a utility function along with a companion utility helper class to return keyword search terms for use as (zero-)prefix suggestion in the omnibox. It builds on top of the KeywordSearchTermVisitEnumerator introduced in crrev.com/c/3611078 which is created by the URLDatabase to enumerate KeywordSearchTermVisits (KSTVs) ordered first by |normalized_search_term| then |last_visit_time| in ascending order. The new utility function uses the enumerator to accumulate the visit counts for the visits to unique normalized search terms and returns a final list which is ranked either by frecency (for zero-prefix) or recency (for prefix) suggestions. This utility function will be used behind a flag in LocalHistoryZeroSuggestProvider and SearchProvider in a follow-up CL. In order to make that integration more straightforward and avoid incurring unnecessary cost as a result of copying the KSTVs, this CL makes KSTV not copyable/movable and changes the data types currently returned from the URLDatabase to vectors of unique pointers. Bug: 1119654 Change-Id: I493a00e8435436a09eb50a0191013a77899b1456 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3640223 Reviewed-by: Justin Donnelly <jdonnelly@chromium.org> Reviewed-by: Scott Violet <sky@chromium.org> Commit-Queue: Mohamad Ahmadi <mahmadi@chromium.org> Cr-Commit-Position: refs/heads/main@{#1002351}
- Loading branch information
Moe Ahmadi
authored and
Chromium LUCI CQ
committed
May 11, 2022
1 parent
cf1637e
commit 43b9054
Showing
12 changed files
with
478 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.