Closed Bug 1636784 Opened 5 years ago Closed 5 years ago

Allow WebExtensions to clear cache and pluginData by hostname

Categories

(WebExtensions :: General, enhancement, P1)

enhancement

Tracking

(firefox78 fixed)

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: evilpie, Assigned: evilpie)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

I think we can just use ClearDataService.jsm for both of these.

No longer blocks: 1340511
Blocks: 1340511

This is currently not yet finished because the tests aren't working yet.
SiteDataTestUtils.hasCacheEntry fails with:

Unexpected exception NS_ERROR_NOT_AVAILABLE: Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsICacheStorage.exists]

I am not sure who to ask about this. Johann it looks like you wrote test_network_cache.js that also uses this functionality.

Flags: needinfo?(jhofmann)

I added comments to the patch. Let me know if that helps, otherwise I'm happy to look into it more :)

Flags: needinfo?(jhofmann)

Thank you! That was very helpful.

I think afterwards we should look into using clearData for some other browsingData.clear methods. That might give us hostname support for free, where supported by the ClearDataService.

Attachment #9147977 - Attachment description: Bug 1636784 - WIP: Use Services.clearData for clearing cache/plugin data → Bug 1636784 - Use Services.clearData for clearing cache/plugin data. r?rpl
Blocks: 1531276
Severity: -- → N/A
Status: NEW → ASSIGNED
Priority: -- → P1
Pushed by evilpies@gmail.com: https://hg.mozilla.org/integration/autoland/rev/8ca49faffad0 Use Services.clearData for clearing cache/plugin data. r=rpl
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: