Closed Bug 1577733 Opened 5 years ago Closed 5 years ago

Switch to referencing engines by id instead of display names in SearchService

Categories

(Firefox :: Search, task, P2)

task
Points:
5

Tracking

()

RESOLVED FIXED
Firefox 72
Iteration:
72.1 - Oct 21 - Nov 3
Tracking Status
firefox72 --- fixed

People

(Reporter: daleharvey, Assigned: standard8)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

As mentioned in https://phabricator.services.mozilla.com/D42879

In SearchService we refer to engines by their displayname (eg: Google) instead of the engine id which is quite confusing and brittle at least for builtin engines, see if we can switch to using a stable id instead

Priority: -- → P2
Assignee: nobody → standard8
Iteration: --- → 71.2 - Sept 16 - 29
Points: --- → 5

Parts of code that use the display name currently:

  • _searchDefault (and associated searchDefault in cache) - the default engine from the engine list
  • _currentEngine (current) - the user's default engine
  • _searchOrder - the order of the engines from the engine list. This doesn't get saved in the cache.
Iteration: 71.2 - Sept 16 - 29 → 71.3 - Sept 30 - Oct 13
Status: NEW → ASSIGNED
Iteration: 71.3 - Sept 30 - Oct 13 → 72.1 - Oct 21 - Nov 3
Depends on: 1590404
Blocks: 1590860

I ended up with a couple of follow-up bugs to be done at some stage later - bug 1590803 and bug 1590860. Although I was looking at ways of doing bug 1590860 in these patches (because the sort orders for getDefaultEngines are broken), I ended up deciding that was getting too complex and it only really affected restoring default for distributions.

Try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=08bf8389631ca2db62b81491bec51d95e8db2558

Blocks: 1592323
Blocks: 1592335
Attachment #9103665 - Attachment description: Bug 1577733 - Change SearchService's _searchDefault/_searchPrivateDefault to reference engines by id instead of display names for the modern config. r?mikedeboer → Bug 1577733 - Change SearchService's _searchDefault/_searchPrivateDefault to reference engines by an ascii identifier instead of display names for the modern config. r?mikedeboer
Attachment #9103666 - Attachment description: Bug 1577733 - Change SearchService's _searchOrder to reference engines by id instead of display names for the modern config. r?mikedeboer" -a → Bug 1577733 - Change SearchService's _searchOrder to reference engines by ascii identifier instead of display names for the modern config. r?mikedeboer" -a
Pushed by mbanner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ba7a039edd59 Change SearchService's _searchDefault/_searchPrivateDefault to reference engines by an ascii identifier instead of display names for the modern config. r=mikedeboer https://hg.mozilla.org/integration/autoland/rev/270ccc6de9ad Change SearchService's _searchOrder to reference engines by ascii identifier instead of display names for the modern config. r=mikedeboer" -a
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 72
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: