Closed Bug 1883402 Opened 2 months ago Closed 2 months ago

Tidy up add-on related functions in the search service

Categories

(Firefox :: Search, task, P3)

task

Tracking

()

RESOLVED FIXED
125 Branch
Tracking Status
firefox125 --- fixed

People

(Reporter: standard8, Assigned: standard8)

Details

Attachments

(2 files)

Whilst working on the search service in other bugs, I noticed a couple of items that we could tidy up:

  • nsISearchService.addEnginesFromExtension returns a list of engines that were added, but we never use the returned list.
  • _createAndAddEngine could be better named, but also can be called directly in more instances rather than going through #installExtensionEngine.
    • Avoiding the intermediate will mean less complexity, and make it easier to know that we can remove #installExtensionEngine when we remove the old search configuration.
    • We can also clean up the console logging a bit.

_createAndAddEngine (renamed to #createAndAddAddibEngine) can be called directly in more cases,
because startup engines are only ever single-locale based. Application provided engines
(which could be multi-locale) are treated differently.

Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d42ed22ce9cc
Stop returning engines from nsISearchService.addEnginesFromExtension as they are never used. r=search-reviewers,daleharvey
https://hg.mozilla.org/integration/autoland/rev/f1f2f748d16f
Call _createAndAddEngine directly in more cases and rename it. r=search-reviewers,daleharvey
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 125 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: