зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset d04bd6e1521f (bug 1472715) for ES lint failure in components/telemetry/TelemetrySend.jsm on a CLOSED TREE
This commit is contained in:
Родитель
1c4dd4a36e
Коммит
b2410865d4
|
@ -221,18 +221,6 @@ var TelemetrySend = {
|
|||
return TelemetrySendImpl.submitPing(ping, options);
|
||||
},
|
||||
|
||||
/**
|
||||
* Check if sending is disabled. If Telemetry is not allowed to upload,
|
||||
* pings are not sent to the server.
|
||||
* If trying to send a deletion ping, don't block it.
|
||||
*
|
||||
* @param {Object} [ping=null] A ping to be checked.
|
||||
* @return {Boolean} True if pings can be send to the servers, false otherwise.
|
||||
*/
|
||||
sendingEnabled(ping = null) {
|
||||
return TelemetrySendImpl.sendingEnabled(ping)
|
||||
},
|
||||
|
||||
/**
|
||||
* Notify that we can start submitting data to the servers.
|
||||
*/
|
||||
|
@ -1236,9 +1224,10 @@ var TelemetrySendImpl = {
|
|||
},
|
||||
|
||||
/**
|
||||
* Check if sending is disabled. If Telemetry is not allowed to upload,
|
||||
* pings are not sent to the server.
|
||||
* If trying to send a deletion ping, don't block it.
|
||||
* Check if sending is disabled. If FHR is not allowed to upload,
|
||||
* pings are not sent to the server (Telemetry is a sub-feature of FHR). If trying
|
||||
* to send a deletion ping, don't block it.
|
||||
* If unified telemetry is off, don't send pings if Telemetry is disabled.
|
||||
*
|
||||
* @param {Object} [ping=null] A ping to be checked.
|
||||
* @return {Boolean} True if pings can be send to the servers, false otherwise.
|
||||
|
|
|
@ -10,7 +10,6 @@ ChromeUtils.import("resource://gre/modules/TelemetryTimestamps.jsm");
|
|||
ChromeUtils.import("resource://gre/modules/TelemetryController.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/TelemetryArchive.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/TelemetryUtils.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/TelemetrySend.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/Preferences.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
|
@ -207,7 +206,8 @@ var Settings = {
|
|||
}
|
||||
},
|
||||
|
||||
getStatusString(enabled) {
|
||||
getStatusStringForSetting(setting) {
|
||||
let enabled = Preferences.get(setting.pref, setting.defaultPrefValue);
|
||||
let status = bundle.GetStringFromName(enabled ? "telemetryUploadEnabled" : "telemetryUploadDisabled");
|
||||
return status;
|
||||
},
|
||||
|
@ -217,7 +217,7 @@ var Settings = {
|
|||
*/
|
||||
render() {
|
||||
let settingsExplanation = document.getElementById("settings-explanation");
|
||||
let uploadEnabled = this.getStatusString(TelemetrySend.sendingEnabled());
|
||||
let uploadEnabled = this.getStatusStringForSetting(this.SETTINGS[0]);
|
||||
let extendedEnabled = Services.telemetry.canRecordExtended;
|
||||
let collectedData = bundle.GetStringFromName(extendedEnabled ? "prereleaseData" : "releaseData");
|
||||
let explanation = bundle.GetStringFromName("settingsExplanation");
|
||||
|
|
Загрузка…
Ссылка в новой задаче