Closed
Bug 344366
Opened 19 years ago
Closed 19 years ago
data is still collected after setting metrics.upload.enable to false
Categories
(Toolkit Graveyard :: Data Collection/Metrics, defect)
Toolkit Graveyard
Data Collection/Metrics
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: bryner, Assigned: bryner)
References
Details
Attachments
(1 file)
7.07 KB,
patch
|
Details | Diff | Splinter Review |
Setting this pref to false should put us in the same state as if it was never set to true -- that is, all collection should be stopped.
Assignee | ||
Comment 1•19 years ago
|
||
This patch clears out the config and data file, and stops all collectors, when we find the pref to be disabled. I do this on startup, in addition to on pref-change notification, in case the pref was edited by hand.
Attachment #228963 -
Flags: first-review?(marria)
Comment 2•19 years ago
|
||
Comment on attachment 228963 [details] [diff] [review]
patch
>+ nsCOMPtr<nsIFile> configFile;
>+ GetConfigFile(getter_AddRefs(configFile));
>+ if (configFile) {
>+ configFile->Remove(PR_FALSE);
>+ }
>+
>+ nsCOMPtr<nsILocalFile> dataFile;
>+ GetDataFile(&dataFile);
>+ if (dataFile) {
>+ dataFile->Remove(PR_FALSE);
>+ }
Does it make sense to check if these files exist before removing them? (Not sure it matters)
>+ if (!CollectionEnabled()) {
>+ MS_LOG(("Upload disabled or URI not set"));
>+ return NS_ERROR_ABORT;
>+ }
Fix logging to say only that upload is disabled
otherwise looks good
Attachment #228963 -
Flags: first-review?(marria) → first-review+
Assignee | ||
Comment 3•19 years ago
|
||
(In reply to comment #2)
> Does it make sense to check if these files exist before removing them? (Not
> sure it matters)
I think that would actually be more expensive and not gain us anything.
Assignee | ||
Comment 4•19 years ago
|
||
checked in
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 5•19 years ago
|
||
*** Bug 341785 has been marked as a duplicate of this bug. ***
You need to log in
before you can comment on or make changes to this bug.
Description
•