Closed Bug 947779 Opened 9 years ago Closed 5 years ago
Stats] - Support auto clearing statistics and alrams when app is uninstalled
From a privacy perspective, when app is removed, we should auto-clear all records associated to this app. This bug is created to discuss how to design and implement this auto-clear behavior in PowerStats API.
In Bug 854200 , I porposed to catch the "webapps-clear-data" notification when app is removed and use a preference to control whether we should auto-clean the power usage record of that app. Jonas also suggested we can observe another notification to catch the event of removing app instead of observing "webapps-clear-data". Hi Jonas, could you tell me that notification name? Thanks.  https://bugzilla.mozilla.org/show_bug.cgi?id=854200#c59
Hi Jonas: Did you mean we can listen the "webapps-uninstall" notification ?  http://mxr.mozilla.org/mozilla-central/source/dom/apps/src/Webapps.jsm#3292
Yes, please use "webapps-uninstall" instead.
Summary: [Per app power metering] - Support auto clearing power statistics when app is removed → [ResourceStats] - Support auto clearing statistics when app is uninstalled
Summary: [ResourceStats] - Support auto clearing statistics when app is uninstalled → [ResourceStats] - Support auto clearing statistics and alrams when app is uninstalled
Hi Vicamo and Ethan: For privacy concern, we want to delete all related data and record when an app is unistalled. This patch clears all stats of an app saved in DB and statsCache when the b2g process receives the "webapps-uninstall" notification.
Hi Vicamo and Ethan: This patch adds a new xpcshell test to test _db.processAppUninstall(). And, here is the try result: https://tbpl.mozilla.org/?tree=Try&rev=ab8ffc25aaa5
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.