This folder contains the backend implementation of Chrome OS launcher search.
SearchController. This controls all the core search functions such as starting a search, collecting results, ranking and publishing. Implemented by SearchControllerImplNew
.
To interact with the frontend, it calls the AppListController
and AppListModelUpdater
, and is called by the AppListClient
.
SearchProvider. The base class for all search providers. Each search provider typically handles one type of result, such as settings, apps or files. Some search providers implement their search function locally, while others call out to further backends.
SearchControllerFactory. Responsible for the creation of the search controller and its providers at start-up time.
ChromeSearchResult. The base class for all search results. Each ChromeSearchResult
contains the information associated with one result. This information is stored in a SearchResultMetadata
object which is piped to the frontend code.
Ranking is the process of assigning scores to each result and category to determine their final display order. Located inside the ranking/
subdirectory.
chrome/browser/ash/app_list/
. Contains a state machine that converts raw UI events into information such as impressions and launches.AppListNotifier
and logs metrics accordingly.SearchController::StartSearch(query)
.SearchController
forwards this query to its various search providers.SearchController
collects these results and performs ranking on the results and their categories.Steps #3-5 may be repeated several times due to the asynchronous nature of #3. The BurnInController
contains timing logic to reduce the UI effect of results popping in.
Training may be performed:
SearchController
forwards this information to its various search providers and rankers, which can use this information to inform future searches and ranking.Zero state is the UI shown before the user types any query. It consists of the Continue section (recent files), the recent apps row, as well as the app grid. The SearchController
handles ranking for continue files and recent apps.
Steps #1-4 closely mirror query search, but publishing is handled differently.
SearchController::StartZeroState(callback, timeout)
.callback
is run, which by contract should happen no later than timeout
.SearchController
forwards this request to its various zero state providers.SearchController
collects these results and performs ranking on the results and their categories.SearchController
will publish any existing results and unblock the UI:timeout
has elapsed,SearchController
waits until all of them have returned and publishes results once more to the UI.The most common situation is that recent apps return before the timeout, but the continue files providers return later.
Training may be performed, the same as with query search.