mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-05 08:35:26 +00:00
Bug 821879 - don't initialize Telemetry if we can't send any data in; r=vdjeric
This commit is contained in:
parent
3ce45c1705
commit
9b0fdc6323
@ -717,6 +717,15 @@ TelemetryPing.prototype = {
|
||||
* Initializes telemetry within a timer. If there is no PREF_SERVER set, don't turn on telemetry.
|
||||
*/
|
||||
setup: function setup() {
|
||||
#ifdef MOZILLA_OFFICIAL
|
||||
if (!Telemetry.canSend) {
|
||||
// We can't send data; no point in initializing observers etc.
|
||||
// Only do this for official builds so that e.g. developer builds
|
||||
// still enable Telemetry based on prefs.
|
||||
Telemetry.canRecord = false;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
let enabled = false;
|
||||
try {
|
||||
enabled = Services.prefs.getBoolPref(PREF_ENABLED);
|
||||
|
Loading…
Reference in New Issue
Block a user