mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 01:05:45 +00:00
Bug 1462725 - Uninit study on Firefox shutdown; r=rhelmer
Intended to undo study-related changes that don't need to persist between sessions: clear prefs, remove observers, etc. MozReview-Commit-ID: GsoDhxf6CVJ --HG-- extra : rebase_source : 5679a48de8e7e95c2b02619738582948032b2c19
This commit is contained in:
parent
8b9593b0d5
commit
30a653a6d1
@ -1115,6 +1115,8 @@ BrowserGlue.prototype = {
|
||||
}
|
||||
|
||||
Normandy.uninit();
|
||||
|
||||
SavantShieldStudy.uninit();
|
||||
},
|
||||
|
||||
// All initial windows have opened.
|
||||
|
@ -37,6 +37,9 @@ class SavantShieldStudyClass {
|
||||
this.endStudy("ineligible");
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO check expiration, add study duration override pref
|
||||
|
||||
// check the pref in case Normandy flipped it on before we could add the pref listener
|
||||
this.shouldCollect = Services.prefs.getBoolPref(this.STUDY_PREF);
|
||||
if (this.shouldCollect) {
|
||||
@ -70,10 +73,7 @@ class SavantShieldStudyClass {
|
||||
|
||||
// Called on every Firefox shutdown and endStudy
|
||||
uninit() {
|
||||
// TODO: Make sure uninit() is called on every Firefox shutdown (look inside
|
||||
// nsBrowserGlue.js to see where Normandy uninits)
|
||||
// TODO: See what happens during Normandy's uninit method to ensure nothing
|
||||
// is forgotten.
|
||||
// TODO: clear study expiration override pref and remove its listener
|
||||
Services.prefs.removeObserver(this.STUDY_PREF, this);
|
||||
Services.prefs.clearUserPref(this.STUDY_PREF);
|
||||
Services.prefs.clearUserPref(PREF_LOG_LEVEL);
|
||||
|
Loading…
Reference in New Issue
Block a user