Closed Bug 792892 Opened 12 years ago Closed 6 years ago

Apps API - Clear App Data

Categories

(Core Graveyard :: DOM: Apps, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: bent.mozilla, Unassigned)

References

Details

(Whiteboard: [LOE:S])

+++ This bug was initially created as a clone of Bug #784378 +++

This bug covers platform work needed for https://github.com/mozilla-b2g/gaia/issues/1234 (requirement #1 from bug 784378 comment 9)
Summary: Browser API - Clear Private Data → Apps API - Clear App Data
Component: DOM: Mozilla Extensions → DOM: Apps
Clearing flags and such for re-triage.
blocking-basecamp: + → ?
Keywords: feature
Whiteboard: [LOE:M][WebAPI:P1] → [LOE:M]
blocking-basecamp: ? → -
For information, given that we have to clear app data when we uninstall an app and we have to clear browser's app data when requested by the user, adding that functionality would only consist of adding a way to inform the backend from the frontend that we want to clear app data for a specific app. All the other code will already be there.
Whiteboard: [LOE:M] → [LOE:S]
For reference, would be great to have the rationale for blocking- here.
I think we were going to treat this as a blocker bug (hence blocking-).
blocking-basecamp: - → ---
Is this something we even want to do?

We now already have the ability to uninstall an app (at which point all its data gets deleted) as well as the ability to clear all browser-related data for an app (at which point only the data in the "browser-cookiejar" gets deleted).


I could see adding a feature in the settings app which displayed the amount of data used up by each app and a button next to it which allowed clearing all stored data. But there's no reason to believe that the app would just accumulate the same amount of data again.

Hopefully we will soon have the ability for apps and websites to store non-permanent data. At that point apps can use such non-permanent storage more freely. But at that point we wouldn't need an API for clearing that data. We'd simply do it automatically as space is running low.
I think that is a feature we want. Whether we should have that for basecamp or later is more a product decision but clearly it's an interesting features for users. For example, if I have an application I used but want to reset it completely, being able to do that without un-installing is good. It would save time and would save the cost of the data.
(In reply to Jonas Sicking (:sicking) from comment #5)
> Is this something we even want to do?
> 
> I could see adding a feature in the settings app which displayed the amount
> of data used up by each app and a button next to it which allowed clearing
> all stored data.

The feature you describe is covered by https://github.com/mozilla-b2g/gaia/issues/1234 which was marked as basecamp-blocking- after this platform feature got marked blocking-basecamp- (which I note has been removed since).

Remember that many apps can not be removed, so un-installing to clear data is not always possible. I think the answer is that yes this is something we want, but it's currently not considered to block the release.
I agree with the rationale in comment 6.  It's the exact reason why a user would want this feature.  This is not a blocker for v1, but something Mozilla as an organization (more specifically) our Privacy team would like to see implemented shortly after v1.  

Per comment 2, it sounds like we'd also be quite close and it's LOE:S.
One clarification question: how is 'clear app data' for a regular app (i.e. NY Times) vs. the Browser app different or are they the same?
> Per comment 2, it sounds like we'd also be quite close and it's LOE:S.

While this bug is definitely not a lot of work, we'd also need front-end work.

Still not a lot of work, but we are explicitly past feature freeze at this point.

(In reply to Chris Lee [:clee] from comment #9)
> One clarification question: how is 'clear app data' for a regular app (i.e.
> NY Times) vs. the Browser app different or are they the same?

Clear private data *in* the browser app allows the browser to clear all data stored by webpages, but doesn't affect any of the data created by the browser app itself. I.e. awesome bar, bookmarks, configurations, reading lists, etc is not affected when the clear private data API is called. The browser app is certainly free to also remove any such data at the same time, or using separate buttons, but they are different from a platform point of view.

But yes, "clear private data" in the browser app clears the same types of data about the nytimes website as "clear app data" would clear about the nytimes app.

One difference is that users generally expect apps to store data, especially since they intentionally installed the app. And the fact that the user has visited the app is certainly clear as long as the app remains installed.
I think we're done here.  \o/
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
I don't think this bug is fixed. We still don't have an API exposed to anyone which allows clearing all data associated with an app. All we have is the ability to clear the "browser data" associated with an app, i.e. the data created by pages inside <iframe mozbrowser> inside an app.

But my understanding was that this bug was explicitly about *all* data for a given app. I.e. essentially a "factory reset" for a particular app.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Blocks: 1055173
See Also: → 1149892
Product: Core → Core Graveyard
Core Graveyard / DOM: Apps is inactive. Closing all bugs in this component.
Status: REOPENED → RESOLVED
Closed: 11 years ago6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.