Commit d0401aad authored by henry's avatar henry Committed by morgan
Browse files

fixup! BB 43864: Modify the urlbar for Base Browser.

BB 45168: Hide the history search option.
parent 14873cf2
Loading
Loading
Loading
Loading
Loading
+13 −3
Original line number Diff line number Diff line
@@ -456,10 +456,20 @@ export class SearchModeSwitcher {
      // search modes. Hence when the settings redesign is enabled we show
      // all local search modes regardless of the prefs.
      this.#engines = searchEngines.concat(
        lazy.UrlbarUtils.LOCAL_SEARCH_MODES.filter(
          engine =>
        lazy.UrlbarUtils.LOCAL_SEARCH_MODES.filter(engine => {
          // Do not show the search history option in PBM. tor-browser#43864.
          // Although, it can still be triggered with "^" restrict keyword or
          // through an app menu item. See also mozilla bug 1980928.
          if (
            engine.source === lazy.UrlbarUtils.RESULT_SOURCE.HISTORY &&
            lazy.PrivateBrowsingUtils.permanentPrivateBrowsing
          ) {
            return false;
          }
          return (
            lazy.settingsRedesignEnabled || lazy.UrlbarPrefs.get(engine.pref)
        )
          );
        })
      );
    }
  }