Closed Bug 1362996 Opened 3 years ago Closed 2 years ago

Implement browsingData.removeCache WebExtension API method on android

Categories

(WebExtensions :: Android, enhancement, P5)

enhancement

Tracking

(firefox57 verified, firefox58 verified, firefox59 verified)

VERIFIED FIXED
mozilla57
Tracking Status
firefox57 --- verified
firefox58 --- verified
firefox59 --- verified

People

(Reporter: shatur, Assigned: shatur, Mentored)

References

(Blocks 1 open bug)

Details

(Whiteboard: [triaged])

Attachments

(2 files)

This method clears the browser's cache. Doc can be found at [1].

[1]. https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/browsingData/removeCache
Depends on: 1362118
No longer depends on: gsoc2017-android-webext
Blocks: 1362118
No longer depends on: 1362118
Priority: -- → P5
Whiteboard: [triaged]
Assignee: nobody → tushar.saini1285
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Comment on attachment 8880221 [details]
Bug 1362996 - Implement browsingData.removeCache WebExtension API method on android.

https://reviewboard.mozilla.org/r/151582/#review156554

::: commit-message-ced0f:1
(Diff revision 1)
> +Bug 1362996 - Implement browsingData.removeCache WebExtension API method on android.

Hey Matthew,

For desktop, removeCache() don not provide option to delete it wrt to time. Also, I was not able to find any methodby which we can add such functionality on fennec. So should we implement this as we've done for desktop or you've any other preference?

Thanks!
Flags: needinfo?(mwein)
Comment on attachment 8880221 [details]
Bug 1362996 - Implement browsingData.removeCache WebExtension API method on android.

https://reviewboard.mozilla.org/r/151582/#review164710

Looks good. Nice work, Tushar. Just one comment about the implementation.

::: mobile/android/components/extensions/ext-browsingData.js:97
(Diff revision 2)
> +
>          removeCookies(options) {
>            return clearCookies(options);
>          },
> +
> +        async removeCache(options){

It doesn't seem like this needs to be `async`.
Attachment #8880221 - Flags: review?(bob.silverberg) → review-
Flags: needinfo?(matthewjwein)
Comment on attachment 8880221 [details]
Bug 1362996 - Implement browsingData.removeCache WebExtension API method on android.

https://reviewboard.mozilla.org/r/151582/#review166934

Thanks for making that change, Tushar. It looks good now. This will still need a final review from a WebExtensions peer before landing.
Attachment #8880221 - Flags: review?(bob.silverberg) → review+
Attachment #8880221 - Flags: review?(mixedpuppy)
Comment on attachment 8880221 [details]
Bug 1362996 - Implement browsingData.removeCache WebExtension API method on android.

https://reviewboard.mozilla.org/r/151582/#review167388
Attachment #8880221 - Flags: review?(mixedpuppy) → review+
Comment on attachment 8880221 [details]
Bug 1362996 - Implement browsingData.removeCache WebExtension API method on android.

https://reviewboard.mozilla.org/r/151582/#review168968

Two r+ are probably enough :)
Attachment #8880221 - Flags: review?(gkruglov)
Try looks good, we can land this!!
Keywords: checkin-needed
Pushed by s.kaspari@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/ea862a5c0067
Implement browsingData.removeCache WebExtension API method on android. r=bsilverberg,mixedpuppy
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/ea862a5c0067
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Attached image Bug1362996.gif
This issue is verified as fixed on Fennec 57.0 (20171112125738), Fennec 58.0b3 (20171113173459) and Fennec 59.0a1 (2017-11-16) under Android 6.0.1.

The cache is removed from the storage.

Extension used: https://addons-dev.allizom.org/en-US/firefox/addon/browsingdataremovecacheandroid/  

Please see the attached video.
Status: RESOLVED → VERIFIED
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.