Commit 7e41c986 authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame 🎃 Committed by brizental
Browse files

fixup! MB 213: Customize the search engines list

BB 43525: Skip Remote Settings for search engine customization.
parent a65eaa87
Loading
Loading
Loading
Loading
+15 −6
Original line number Diff line number Diff line
@@ -2680,12 +2680,21 @@ export class SearchService {
  // This is prefixed with _ rather than # because it is
  // called in test_remove_engine_notification_box.js
  async _fetchEngineSelectorEngines() {
    const engines = await (
      await fetch(
        "chrome://global/content/search/mullvadBrowserSearchEngines.json"
      )
    ).json();
    return { engines, privateDefault: undefined };
    let searchEngineSelectorProperties = {
      locale: Services.locale.appLocaleAsBCP47,
      region: lazy.Region.home || "unknown",
      channel: lazy.SearchUtils.MODIFIED_APP_CHANNEL,
      experiment: this._experimentPrefValue,
      distroID: lazy.SearchUtils.distroID ?? "",
    };

    for (let [key, value] of Object.entries(searchEngineSelectorProperties)) {
      this._settings.setMetaDataAttribute(key, value);
    }

    return this.#engineSelector.fetchEngineConfiguration(
      searchEngineSelectorProperties
    );
  }

  #setDefaultFromSelector(refinedConfig) {