зеркало из https://github.com/mozilla/gecko-dev.git
Bug 822017 - Remove the global PB specific code from the testpilot extension; r=dao
--HG-- rename : browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/setup.js => browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/setup.js.in rename : browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/tasks.js => browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/tasks.js.in
This commit is contained in:
Родитель
a127013839
Коммит
afbf0d1b25
|
@ -172,8 +172,10 @@ let TestPilotSetup = {
|
|||
"testpilot:task:dataAutoSubmitted", this._onTaskDataAutoSubmitted, self);
|
||||
// Set up observation for application shutdown.
|
||||
this._obs.add("quit-application", this.globalShutdown, self);
|
||||
#ifndef MOZ_PER_WINDOW_PRIVATE_BROWSING
|
||||
// Set up observation for enter/exit private browsing:
|
||||
this._obs.add("private-browsing", this.onPrivateBrowsingMode, self);
|
||||
#endif
|
||||
|
||||
// Set up timers to remind user x minutes after startup
|
||||
// and once per day thereafter. Use nsITimer so it doesn't belong to
|
||||
|
@ -243,7 +245,9 @@ let TestPilotSetup = {
|
|||
this._obs.remove(
|
||||
"testpilot:task:dataAutoSubmitted", this._onTaskDataAutoSubmitted, self);
|
||||
this._obs.remove("quit-application", this.globalShutdown, self);
|
||||
#ifndef MOZ_PER_WINDOW_PRIVATE_BROWSING
|
||||
this._obs.remove("private-browsing", this.onPrivateBrowsingMode, self);
|
||||
#endif
|
||||
this._loader.unload();
|
||||
this._shortTimer.cancel();
|
||||
this._longTimer.cancel();
|
||||
|
@ -257,6 +261,7 @@ let TestPilotSetup = {
|
|||
return wm.getMostRecentWindow("navigator:browser");
|
||||
},
|
||||
|
||||
#ifndef MOZ_PER_WINDOW_PRIVATE_BROWSING
|
||||
onPrivateBrowsingMode: function TPS_onPrivateBrowsingMode(topic, data) {
|
||||
for (let i = 0; i < this.taskList.length; i++) {
|
||||
if (data == "enter") {
|
||||
|
@ -266,6 +271,7 @@ let TestPilotSetup = {
|
|||
}
|
||||
}
|
||||
},
|
||||
#endif
|
||||
|
||||
onWindowUnload: function TPS__onWindowRegistered(window) {
|
||||
this._logger.trace("Called TestPilotSetup.onWindow unload!");
|
|
@ -162,11 +162,13 @@ var TestPilotTask = {
|
|||
// Called by extension core when Firefox is shutting down.
|
||||
},
|
||||
|
||||
#ifndef MOZ_PER_WINDOW_PRIVATE_BROWSING
|
||||
onEnterPrivateBrowsing: function TestPilotTask_onEnterPrivate() {
|
||||
},
|
||||
|
||||
onExitPrivateBrowsing: function TestPilotTask_onExitPrivate() {
|
||||
},
|
||||
#endif
|
||||
|
||||
onNewWindow: function TestPilotTask_onNewWindow(window) {
|
||||
},
|
||||
|
@ -532,6 +534,7 @@ TestPilotExperiment.prototype = {
|
|||
}
|
||||
},
|
||||
|
||||
#ifndef MOZ_PER_WINDOW_PRIVATE_BROWSING
|
||||
onEnterPrivateBrowsing: function TestPilotExperiment_onEnterPrivate() {
|
||||
this._logger.trace("Task is entering private browsing.");
|
||||
if (this.experimentIsRunning()) {
|
||||
|
@ -553,6 +556,7 @@ TestPilotExperiment.prototype = {
|
|||
}
|
||||
}
|
||||
},
|
||||
#endif
|
||||
|
||||
getStudyMetadata: function TestPilotExperiment_getStudyMetadata() {
|
||||
try {
|
Загрузка…
Ссылка в новой задаче