[ResourceStats] - Support auto clearing statistics and alrams when app is uninstalled

RESOLVED WONTFIX

Status

RESOLVED WONTFIX
5 years ago
8 months ago

People

(Reporter: bochen, Assigned: bochen)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 5 obsolete attachments)

(Assignee)

Description

5 years ago
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.
(Assignee)

Updated

5 years ago
Depends on: 854200
(Assignee)

Updated

5 years ago
Assignee: nobody → bochen
(Assignee)

Comment 1

5 years ago
In Bug 854200 [1], 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.

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=854200#c59
Flags: needinfo?(jonas)
(Assignee)

Comment 2

5 years ago
Hi Jonas:

Did you mean we can listen the "webapps-uninstall" notification [1]?

[1] http://mxr.mozilla.org/mozilla-central/source/dom/apps/src/Webapps.jsm#3292
Yes, please use "webapps-uninstall" instead.
Flags: needinfo?(jonas)
(Assignee)

Updated

5 years ago
Summary: [Per app power metering] - Support auto clearing power statistics when app is removed → [ResourceStats] - Support auto clearing statistics when app is uninstalled
(Assignee)

Updated

5 years ago
Depends on: 951976
No longer depends on: 854200
(Assignee)

Updated

5 years ago
Summary: [ResourceStats] - Support auto clearing statistics when app is uninstalled → [ResourceStats] - Support auto clearing statistics and alrams when app is uninstalled
(Assignee)

Comment 4

5 years ago
Created attachment 8390966 [details] [diff] [review]
(WIP) Bug-947779-clearPrivateData.patch
(Assignee)

Comment 5

5 years ago
Created attachment 8395518 [details] [diff] [review]
(WIP) Bug-947779-clearPrivateData.patch
Attachment #8390966 - Attachment is obsolete: true
(Assignee)

Comment 6

5 years ago
Created attachment 8424565 [details] [diff] [review]
Bug-947779-clearPrivateData_v2.patch
Attachment #8395518 - Attachment is obsolete: true
(Assignee)

Comment 7

4 years ago
Created attachment 8436860 [details] [diff] [review]
Bug-947779-clearPrivateData_v3.patch
Attachment #8424565 - Attachment is obsolete: true
(Assignee)

Comment 8

4 years ago
Created attachment 8441048 [details] [diff] [review]
Bug-947779-clearPrivateData_v4.patch
Attachment #8436860 - Attachment is obsolete: true
(Assignee)

Updated

4 years ago
Depends on: 854200
(Assignee)

Comment 9

4 years ago
Created attachment 8457756 [details] [diff] [review]
Bug-947779-clearPrivateData_v4.patch

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.
Attachment #8441048 - Attachment is obsolete: true
Attachment #8457756 - Flags: review?(vyang)
Attachment #8457756 - Flags: review?(ettseng)
(Assignee)

Comment 10

4 years ago
Created attachment 8457764 [details] [diff] [review]
Bug-947779-testCase_v1.patch

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
Attachment #8457764 - Flags: review?(vyang)
Attachment #8457764 - Flags: review?(ettseng)
(Assignee)

Updated

4 years ago
Attachment #8457764 - Flags: review?(vyang)
Attachment #8457764 - Flags: review?(ettseng)
(Assignee)

Updated

4 years ago
Attachment #8457756 - Flags: review?(vyang)
Attachment #8457756 - Flags: review?(ettseng)

Comment 11

8 months ago
Firefox OS is not being worked on
Status: NEW → RESOLVED
Last Resolved: 8 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.