Use the pref manager to handle precedence for extensions using chrome_url_overrides

NEW
Unassigned

Status

()

Toolkit
WebExtensions: Frontend
P2
normal
4 months ago
17 days ago

People

(Reporter: mattw, Unassigned)

Tracking

({dev-doc-needed})

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: triaged)

(Reporter)

Description

4 months ago
Handling precedence should be done by the preference manager.

The most recent extension which requests permission to override a page should gain precedence. 

Note: multiple extensions can have precedence with chrome_url_overrides if they each request access to override different pages (e.g. both extensions should have precedence if the first overrides "about:newtab" and the second overrides "about:home").
(In reply to Matthew Wein [:mattw] from comment #0)
> 
> The most recent extension which requests permission to override a page
> should gain precedence. 
> 

This is contrary to our discussion on Tuesday. Maybe it needs to be different for page overrides than it is for preferences, but in our meeting we discussed that the earliest extension would always win in terms of precedence, so if a later extension requests a change it would *not* override an earlier one.
(Reporter)

Comment 2

4 months ago
> This is contrary to our discussion on Tuesday. Maybe it needs to be
> different for page overrides than it is for preferences, but in our meeting
> we discussed that the earliest extension would always win in terms of
> precedence, so if a later extension requests a change it would *not*
> override an earlier one.

Okay, sorry, I had it backwards, but that works too. I'm happy as long as we are consistent with either earliest or most recent taking precedence. 

If we could treat "about:newtab", "about:home", etc as preferences, then we wouldn't need to do anything different for page overrides.

Comment 3

3 months ago
I think it was decided in bug 1234150 comment 12 to use the most recent one.

I'm fine either way as long as we stay consistent, both have their pros and cons.
Keywords: dev-doc-needed

Comment 4

17 days ago
I suggest that we allow user to choose which extension's override should be used, or to keep the Firefox default.

 Example implementation:
Whenever the user installs an extension which uses "chrome_url_overrides", Firefox shows a notification which allows the user to keep the previous extension's override, or use the new one. (notification is shown even if the user wasn't previously using any extension which uses "chrome_url_overrides")

Additionally, an option will be added to "about:preferences" or to "about:addons" to select which extension's override should be used for each supported override or to switch back to the Firefox default at any time.
You need to log in before you can comment on or make changes to this bug.