From d356440fa359ea9ca1d7f386e392fcbf57d39470 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Mon, 29 Nov 2021 17:34:58 -0500 Subject: [PATCH] Issue #21 - Remove unused telemetry build variables. Hard-code the values in AppConstants.jsm for compatibility, even if nobody should actually be using this in extensions or what not. --- old-configure.in | 24 ---------------------- python/mozbuild/mozbuild/mozinfo.py | 3 --- toolkit/modules/AppConstants.jsm | 31 ++++------------------------- 3 files changed, 4 insertions(+), 54 deletions(-) diff --git a/old-configure.in b/old-configure.in index 54d6944768..0307dfd2be 100644 --- a/old-configure.in +++ b/old-configure.in @@ -4767,12 +4767,6 @@ if test "$MOZ_PLACES"; then AC_DEFINE(MOZ_PLACES) fi -dnl Build Firefox Health Reporter Service -AC_SUBST(MOZ_SERVICES_HEALTHREPORT) -if test -n "$MOZ_SERVICES_HEALTHREPORT"; then - AC_DEFINE(MOZ_SERVICES_HEALTHREPORT) -fi - dnl Build Sync Services if required AC_SUBST(MOZ_SERVICES_SYNC) if test -n "$MOZ_SERVICES_SYNC"; then @@ -5007,24 +5001,6 @@ AC_SUBST(MOZ_SOURCE_REPO) AC_SUBST(MOZ_SOURCE_CHANGESET) AC_SUBST(MOZ_INCLUDE_SOURCE_INFO) -if test "$MOZ_TELEMETRY_REPORTING"; then - AC_DEFINE(MOZ_TELEMETRY_REPORTING) - - # Enable Telemetry by default for nightly and aurora channels - if test -z "$RELEASE_OR_BETA"; then - AC_DEFINE(MOZ_TELEMETRY_ON_BY_DEFAULT) - fi -fi - -dnl If we have any service that uploads data (and requires data submission -dnl policy alert), set MOZ_DATA_REPORTING. -dnl We need SUBST for build system and DEFINE for xul preprocessor. -if test -n "$MOZ_TELEMETRY_REPORTING" || test -n "$MOZ_SERVICES_HEALTHREPORT"; then - MOZ_DATA_REPORTING=1 - AC_DEFINE(MOZ_DATA_REPORTING) - AC_SUBST(MOZ_DATA_REPORTING) -fi - dnl win32 options AC_SUBST(WIN32_REDIST_DIR) AC_SUBST(WIN_UCRT_REDIST_DIR) diff --git a/python/mozbuild/mozbuild/mozinfo.py b/python/mozbuild/mozbuild/mozinfo.py index c6c95d9230..181cd4801c 100644 --- a/python/mozbuild/mozbuild/mozinfo.py +++ b/python/mozbuild/mozbuild/mozinfo.py @@ -80,12 +80,9 @@ def build_dict(config, env=os.environ): d['nightly_build'] = substs.get('NIGHTLY_BUILD') == '1' d['release_or_beta'] = substs.get('RELEASE_OR_BETA') == '1' d['pgo'] = substs.get('MOZ_PGO') == '1' - d['datareporting'] = bool(substs.get('MOZ_DATA_REPORTING')) - d['healthreport'] = substs.get('MOZ_SERVICES_HEALTHREPORT') == '1' d['sync'] = substs.get('MOZ_SERVICES_SYNC') == '1' d['asan'] = substs.get('MOZ_ASAN') == '1' d['tsan'] = substs.get('MOZ_TSAN') == '1' - d['telemetry'] = substs.get('MOZ_TELEMETRY_REPORTING') == '1' d['tests_enabled'] = substs.get('ENABLE_TESTS') == "1" d['bin_suffix'] = substs.get('BIN_SUFFIX', '') d['official'] = bool(substs.get('MC_OFFICIAL')) diff --git a/toolkit/modules/AppConstants.jsm b/toolkit/modules/AppConstants.jsm index c5e55c98a7..e69742af22 100644 --- a/toolkit/modules/AppConstants.jsm +++ b/toolkit/modules/AppConstants.jsm @@ -60,20 +60,6 @@ this.AppConstants = Object.freeze({ false, #endif - MOZ_SERVICES_HEALTHREPORT: -#ifdef MOZ_SERVICES_HEALTHREPORT - true, -#else - false, -#endif - - MOZ_DATA_REPORTING: -#ifdef MOZ_DATA_REPORTING - true, -#else - false, -#endif - MOZ_SAFE_BROWSING: #ifdef MOZ_SAFE_BROWSING true, @@ -81,19 +67,10 @@ MOZ_SAFE_BROWSING: false, #endif - MOZ_TELEMETRY_REPORTING: -#ifdef MOZ_TELEMETRY_REPORTING - true, -#else - false, -#endif - - MOZ_TELEMETRY_ON_BY_DEFAULT: -#ifdef MOZ_TELEMETRY_ON_BY_DEFAULT - true, -#else - false, -#endif + MOZ_SERVICES_HEALTHREPORT: false, + MOZ_DATA_REPORTING: false, + MOZ_TELEMETRY_REPORTING: false, + MOZ_TELEMETRY_ON_BY_DEFAULT: false, MOZ_UPDATER: #ifdef MOZ_UPDATER