The default bug view has changed. See this FAQ.

Implement browser.sessions.forgetClosedTab and forgetClosedWindow

NEW
Unassigned

Status

()

Toolkit
WebExtensions: General
P5
normal
2 months ago
16 days ago

People

(Reporter: Kain, Unassigned)

Tracking

52 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [design-decision-approved][sessions]triaged)

(Reporter)

Description

2 months ago
User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0
Build ID: 20170123004004

Steps to reproduce:

I attempted to update my XPCOM extension (https://addons.mozilla.org/en-US/firefox/addon/historyblock/) to Web Extension and found some of the core APIs missing.


Actual results:

Specifically, HistoryBlock relies on `nsIBrowserHistory.removePagesFromHost` as well as `nsISessionStore.forgetClosedTab` and `nsISessionStore.forgetClosedWindow` (currently, only the former, but I would like both).


Expected results:

It would be extremely helpful if the `sessions` Web Extension API included `forgetClosedTab` and `forgetClosedWindow`, and if the `history` Web Extension API included `removePagesFromHost` (though, I can probably get by with the existing `deleteUrl`... maybe).
(Reporter)

Comment 1

2 months ago
For some context on HistoryBlock (https://addons.mozilla.org/en-US/firefox/addon/historyblock/):

HistoryBlock allows users to store hashed hostnames in a blacklist, and when a user visits a blacklisted website the history entries are immediately purged. Additionally, if a tab is closed (and hopefully in an upcoming version, if a window is closed) containing a blacklisted hostname, then it is purged from the 'Recently Closed Tabs/Windows' list.

Additionally, cache entries appear to also be purged, though there is no API call for that other than via the history manager's `removePagesFromHost`.
Whiteboard: [design-decision-needed]
(Reporter)

Comment 2

2 months ago
I have created an experimental implementation of the two session APIs I require: https://github.com/kainsavage/moresessions
(Reporter)

Comment 3

2 months ago
Additionally, after some experimentation, I do not require `removePagesFromHost` as `browser.history.deleteUrl` is sufficient.

Comment 4

18 days ago
This has been added to the March 7 WebExtensions Triage meeting agenda. 

Agenda: https://docs.google.com/document/d/1zzfedbTKAHUmm4UctxSOIJV3iKayXQ8TuXPodXW8wC0/edit#
Kain, this proposal has been approved, and we think it makes sense to implement these functions directly in the sessions API, rather than as an experiment. Is this something you are interested in working on?
Assignee: nobody → kain_savage
Status: UNCONFIRMED → ASSIGNED
Component: WebExtensions: Untriaged → WebExtensions: General
Ever confirmed: true
Flags: needinfo?(kain_savage)
Priority: -- → P5
Summary: WebExtension nsISessionStore-equivalent APIs → Implement browser.sessions.forgetClosedTab and forgetClosedWindow
Whiteboard: [design-decision-needed] → [design-decision-approved][sessions]triaged
(Reporter)

Comment 6

16 days ago
Bob, I would love to work on this directly, but my schedule has gotten extremely busy of late (notice, I have not even submitted the pull request for my experiment yet and I said I would do that two weeks ago... apologies).

If there is no one else willing/able to work on it, I would happily donate some time as it becomes available to me, but I do not know when that will be.
Flags: needinfo?(kain_savage)
Thanks for the update, Kain. I will unassign you in case someone else comes along who wants to work on it, but when you do find the time please feel free to pick it up where you left off.
Assignee: kain_savage → nobody
Status: ASSIGNED → NEW
You need to log in before you can comment on or make changes to this bug.