Use the pref manager to handle precedence for extensions using chrome_url_overrides

NEW
Assigned to

Status

()

Toolkit
WebExtensions: Frontend
P2
normal
6 months ago
9 hours ago

People

(Reporter: mattw, Assigned: bsilverberg)

Tracking

unspecified
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: triaged)

(Reporter)

Description

6 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").
(Assignee)

Comment 1

6 months ago
(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

6 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

5 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

3 months 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.

Updated

11 days ago
See Also: → bug 1373853
(Assignee)

Updated

9 hours ago
Assignee: nobody → bob.silverberg
Keywords: dev-doc-needed
(Assignee)

Comment 5

9 hours ago
There is also an issue that currently the new tab override does not persist across browser sessions because it is set by calling aboutNewTabService.newTabURL, but only when the manifest is read.

This should be changed to call aboutNewTabService.newTabURL during onStartup() so that it resets every time the browser is restarted.
(Assignee)

Updated

9 hours ago
webextensions: --- → ?
You need to log in before you can comment on or make changes to this bug.