зеркало из https://github.com/mozilla/pjs.git
Bug 756152 - disable persistent telemetry sending; r=taras
This commit is contained in:
Родитель
ede70200e2
Коммит
52abbe6bd5
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче