browsingData WebExtension API support
Once GeckoView support lands https://bugzilla.mozilla.org/show_bug.cgi?id=1625233 AC will be able to implement the browsingData WebExtension API, the provisional GV API is as follows:
public interface BrowsingDataDelegate {
GeckoResult<Settings> onGetSettings();
GeckoResult<Void> onClearFormData(final long sinceUnixTimestamp);
GeckoResult<Void> onClearPasswords(final long sinceUnixTimestamp);
GeckoResult<Void> onClearDownloads(final long sinceUnixTimestamp);
GeckoResult<Void> onClearHistory(final long sinceUnixTimestamp);
}
Where onGetSettings gets the default settings for what data is deleted by default when pressing the "Clear Data" button in the browser UI, e.g. history, cookies, etc.
And the onClearX are callbacks that indicate that the browser should delete all X created since the timestamp passed in, e.g. onClearDownloads should remove all downloads create before the timestamp passed in.
Note: currently onClearFormData will be a no-op because the browser doesn't store any form data (until we will start storing Credit Cards and addresses information).
┆Issue is synchronized with this Jira Task
FYI this landed in GeckoView and it's available to be implemented now: https://mozilla.github.io/geckoview/javadoc/mozilla-central/org/mozilla/geckoview/WebExtension.BrowsingDataDelegate.html
Moved to bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1796307
Change performed by the Move to Bugzilla add-on.