Bug 822019 - Remove the global PB specific code from the Telemetry; r=jdm

This commit is contained in:
Ehsan Akhgari 2012-12-19 00:12:57 -05:00
parent 9a1f231b0f
commit 5b6135efac

View File

@ -725,7 +725,9 @@ TelemetryPing.prototype = {
Telemetry.canRecord = false;
return;
}
#ifndef MOZ_PER_WINDOW_PRIVATE_BROWSING
Services.obs.addObserver(this, "private-browsing", false);
#endif
Services.obs.addObserver(this, "profile-before-change", false);
Services.obs.addObserver(this, "sessionstore-windows-restored", false);
Services.obs.addObserver(this, "quit-application-granted", false);
@ -950,7 +952,9 @@ TelemetryPing.prototype = {
this._hasXulWindowVisibleObserver = false;
}
Services.obs.removeObserver(this, "profile-before-change");
#ifndef MOZ_PER_WINDOW_PRIVATE_BROWSING
Services.obs.removeObserver(this, "private-browsing");
#endif
Services.obs.removeObserver(this, "quit-application-granted");
},
@ -1018,6 +1022,7 @@ TelemetryPing.prototype = {
this.gatherMemory();
}
break;
#ifndef MOZ_PER_WINDOW_PRIVATE_BROWSING
case "private-browsing":
Telemetry.canRecord = aData == "exit";
if (aData == "enter") {
@ -1026,6 +1031,7 @@ TelemetryPing.prototype = {
this.attachObservers()
}
break;
#endif
case "xul-window-visible":
Services.obs.removeObserver(this, "xul-window-visible");
this._hasXulWindowVisibleObserver = false;