mozilla/gecko-dev
Search service
The search service (toolkit/components/search/) manages the available search engines, the default engine selection, suggestions, and integration with the address bar.
Pieces
SearchService.sys.mjs— registry and selection.SearchEngineSelector.sys.mjs— picks the default engine based on locale, region, and remote configuration.SearchEngine.sys.mjs— the data model.SearchSuggestionController.sys.mjs— fetches suggestions from the engine's suggest URL.
Data sources
- Built-in engines — bundled
.jsengines per locale. - Remote Settings — Mozilla's CDN-distributed config (search-config-v2 collection) selects engines per region/locale.
- OpenSearch — sites can offer engines via
<link rel="search">; users add them. - WebExtensions — extensions can register engines via
chrome_settings_overrides.search_providerin the manifest.
Region / locale logic
SearchEngineSelector consults remote-settings-derived JSON to choose engines for the user's (region, locale) pair — including legal holdout markets (e.g., Russia, Kazakhstan) and partner deals.
Related
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.