Closed Bug 1650761 Opened 5 years ago Closed 2 years ago

Create separate WebExtension and Policy objects to handle different types of Search Engines

Categories

(Firefox :: Search, task, P3)

task

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: standard8, Unassigned)

Details

Following on from splitting out OpenSearchEngine from SearchEngine, I think it would be worth splitting out WebExtension and Policy engines into their own objects, at least for clarity.

The core SearchEngine class would then be used to only manage the general interfaces for getting search queries, information about the engine itself.

WebExtension/OpenSearch/Policy classes would look after initialisation, loading from cache etc.

The WebExtension and Policy setup routes currently use the same parameter types, so we may want an intermediate sub-class for those, or it may be worth simplifying the Policy set-up route completely.

When doing this we should:

  • Separate out the classes
  • Use the different classes when loading the engines.
  • Use the different classes when loading the engines from the cache (xref bug 1650760).
  • Sort out shortName handling, so that we're not setting it in the constructor and then overriding it in init.

We've done this split in a few bugs.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.