Bug 756152 - disable persistent telemetry sending; r=taras

This commit is contained in:
Nathan Froyd 2012-05-17 14:58:48 -04:00
Родитель ede70200e2
Коммит 52abbe6bd5
2 изменённых файлов: 10 добавлений и 0 удалений

Просмотреть файл

@ -173,6 +173,8 @@ TelemetryPing.prototype = {
_startupHistogramRegex: /SQLITE|HTTP|SPDY|CACHE|DNS/,
_slowSQLStartup: {},
_prevSession: null,
// Bug 756152
_disablePersistentTelemetrySending: true,
/**
* When reflecting a histogram into JS, Telemetry hands us an object
@ -643,6 +645,10 @@ TelemetryPing.prototype = {
},
loadHistograms: function loadHistograms(file, sync) {
if (this._disablePersistentTelemetrySending) {
return;
}
let self = this;
let loadCallback = function(data) {
self._prevSession = data;
@ -730,6 +736,9 @@ TelemetryPing.prototype = {
case "test-load-histograms":
this.loadHistograms(aSubject.QueryInterface(Ci.nsILocalFile), true);
break;
case "test-enable-persistent-telemetry-send":
this._disablePersistentTelemetrySending = false;
break;
case "test-ping":
server = aData;
// fall through

Просмотреть файл

@ -34,6 +34,7 @@ var gFinished = false;
function telemetry_ping () {
const TelemetryPing = Cc["@mozilla.org/base/telemetry-ping;1"].getService(Ci.nsIObserver);
TelemetryPing.observe(null, "test-gather-startup", null);
TelemetryPing.observe(null, "test-enable-persistent-telemetry-send", null);
TelemetryPing.observe(null, "test-ping", SERVER);
}