mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1234526 - Remove unused healthreporter prefs. r=gfritzsche
This commit is contained in:
parent
bce1c74783
commit
1b07171dd4
@ -11,7 +11,6 @@ var TelemetryReportingPolicy =
|
||||
Cu.import("resource://gre/modules/TelemetryReportingPolicy.jsm", {}).TelemetryReportingPolicy;
|
||||
|
||||
const PREF_BRANCH = "datareporting.policy.";
|
||||
const PREF_DRS_ENABLED = "datareporting.healthreport.service.enabled";
|
||||
const PREF_BYPASS_NOTIFICATION = PREF_BRANCH + "dataSubmissionPolicyBypassNotification";
|
||||
const PREF_CURRENT_POLICY_VERSION = PREF_BRANCH + "currentPolicyVersion";
|
||||
const PREF_ACCEPTED_POLICY_VERSION = PREF_BRANCH + "dataSubmissionPolicyAcceptedVersion";
|
||||
@ -98,21 +97,17 @@ var checkInfobarButton = Task.async(function* (aNotification) {
|
||||
});
|
||||
|
||||
add_task(function* setup(){
|
||||
const drsEnabled = Preferences.get(PREF_DRS_ENABLED, true);
|
||||
const bypassNotification = Preferences.get(PREF_BYPASS_NOTIFICATION, true);
|
||||
const currentPolicyVersion = Preferences.get(PREF_CURRENT_POLICY_VERSION, 1);
|
||||
|
||||
// Register a cleanup function to reset our preferences.
|
||||
registerCleanupFunction(() => {
|
||||
Preferences.set(PREF_DRS_ENABLED, drsEnabled);
|
||||
Preferences.set(PREF_BYPASS_NOTIFICATION, bypassNotification);
|
||||
Preferences.set(PREF_CURRENT_POLICY_VERSION, currentPolicyVersion);
|
||||
|
||||
return closeAllNotifications();
|
||||
});
|
||||
|
||||
// Disable Healthreport/Data reporting service.
|
||||
Preferences.set(PREF_DRS_ENABLED, false);
|
||||
// Don't skip the infobar visualisation.
|
||||
Preferences.set(PREF_BYPASS_NOTIFICATION, false);
|
||||
// Set the current policy version.
|
||||
|
@ -19,7 +19,6 @@ XPCOMUtils.defineLazyModuleGetter(this, "CommonUtils",
|
||||
|
||||
const PREF_EXPERIMENTS_ENABLED = "experiments.enabled";
|
||||
const PREF_ACTIVE_EXPERIMENT = "experiments.activeExperiment"; // whether we have an active experiment
|
||||
const PREF_HEALTHREPORT_ENABLED = "datareporting.healthreport.service.enabled";
|
||||
const PREF_TELEMETRY_ENABLED = "toolkit.telemetry.enabled";
|
||||
const PREF_TELEMETRY_UNIFIED = "toolkit.telemetry.unified";
|
||||
const DELAY_INIT_MS = 30 * 1000;
|
||||
@ -38,8 +37,7 @@ XPCOMUtils.defineLazyGetter(
|
||||
// We can enable experiments if either unified Telemetry or FHR is on, and the user
|
||||
// has opted into Telemetry.
|
||||
return gPrefs.get(PREF_EXPERIMENTS_ENABLED, false) &&
|
||||
(gPrefs.get(PREF_HEALTHREPORT_ENABLED, false) || IS_UNIFIED_TELEMETRY) &&
|
||||
gPrefs.get(PREF_TELEMETRY_ENABLED, false);
|
||||
IS_UNIFIED_TELEMETRY && gPrefs.get(PREF_TELEMETRY_ENABLED, false);
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(
|
||||
|
@ -23,8 +23,6 @@ XPCOMUtils.defineLazyModuleGetter(this, "HiddenFrame",
|
||||
const PREF_ENABLED = "browser.selfsupport.enabled";
|
||||
// Url to open in the Self Support browser, in the urlFormatter service format.
|
||||
const PREF_URL = "browser.selfsupport.url";
|
||||
// FHR status.
|
||||
const PREF_FHR_ENABLED = "datareporting.healthreport.service.enabled";
|
||||
// Unified Telemetry status.
|
||||
const PREF_TELEMETRY_UNIFIED = "toolkit.telemetry.unified";
|
||||
// UITour status.
|
||||
@ -84,8 +82,8 @@ var SelfSupportBackendInternal = {
|
||||
|
||||
Preferences.observe(PREF_BRANCH_LOG, this._configureLogging, this);
|
||||
|
||||
// Only allow to use SelfSupport if either FHR or Unified Telemetry is enabled.
|
||||
let reportingEnabled = Preferences.get(PREF_FHR_ENABLED, false) || IS_UNIFIED_TELEMETRY;
|
||||
// Only allow to use SelfSupport if Unified Telemetry is enabled.
|
||||
let reportingEnabled = IS_UNIFIED_TELEMETRY;
|
||||
if (!reportingEnabled) {
|
||||
this._log.config("init - Disabling SelfSupport because FHR and Unified Telemetry are disabled.");
|
||||
return;
|
||||
|
@ -1,38 +0,0 @@
|
||||
#filter substitution
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
pref("datareporting.healthreport.currentDaySubmissionFailureCount", 0);
|
||||
pref("datareporting.healthreport.documentServerURI", "https://fhr.data.mozilla.com/");
|
||||
pref("datareporting.healthreport.documentServerNamespace", "metrics");
|
||||
pref("datareporting.healthreport.infoURL", "https://www.mozilla.org/legal/privacy/firefox.html#health-report");
|
||||
pref("datareporting.healthreport.logging.consoleEnabled", true);
|
||||
pref("datareporting.healthreport.logging.consoleLevel", "Warn");
|
||||
pref("datareporting.healthreport.logging.dumpEnabled", false);
|
||||
pref("datareporting.healthreport.logging.dumpLevel", "Debug");
|
||||
pref("datareporting.healthreport.lastDataSubmissionFailureTime", "0");
|
||||
pref("datareporting.healthreport.lastDataSubmissionRequestedTime", "0");
|
||||
pref("datareporting.healthreport.lastDataSubmissionSuccessfulTime", "0");
|
||||
pref("datareporting.healthreport.nextDataSubmissionTime", "0");
|
||||
pref("datareporting.healthreport.pendingDeleteRemoteData", false);
|
||||
|
||||
// Health Report is enabled by default on all channels.
|
||||
pref("datareporting.healthreport.uploadEnabled", true);
|
||||
|
||||
pref("datareporting.healthreport.service.enabled", true);
|
||||
pref("datareporting.healthreport.service.loadDelayMsec", 10000);
|
||||
pref("datareporting.healthreport.service.loadDelayFirstRunMsec", 60000);
|
||||
|
||||
pref("datareporting.healthreport.service.providerCategories",
|
||||
#if MOZ_UPDATE_CHANNEL == release
|
||||
"healthreport-js-provider-default"
|
||||
#elif MOZ_UPDATE_CHANNEL == default
|
||||
"healthreport-js-provider-default"
|
||||
#else
|
||||
"healthreport-js-provider-default,healthreport-js-provider-@MOZ_UPDATE_CHANNEL@"
|
||||
#endif
|
||||
);
|
||||
|
||||
pref("datareporting.healthreport.about.reportUrl", "https://fhr.cdn.mozilla.net/%LOCALE%/v4/");
|
||||
pref("datareporting.healthreport.about.reportUrlUnified", "https://fhr.cdn.mozilla.net/%LOCALE%/v4/");
|
@ -31,10 +31,7 @@ class GeckoInstance(object):
|
||||
"browser.urlbar.userMadeSearchSuggestionsChoice": True,
|
||||
"browser.warnOnQuit": False,
|
||||
"dom.ipc.reportProcessHangs": False,
|
||||
"datareporting.healthreport.service.enabled": False,
|
||||
"datareporting.healthreport.uploadEnabled": False,
|
||||
"datareporting.healthreport.service.firstRun": False,
|
||||
"datareporting.healthreport.logging.consoleEnabled": False,
|
||||
"datareporting.policy.dataSubmissionEnabled": False,
|
||||
"datareporting.policy.dataSubmissionPolicyAccepted": False,
|
||||
"focusmanager.testmode": True,
|
||||
|
@ -36,7 +36,6 @@ const PREF_SERVER = PREF_BRANCH + "server";
|
||||
const PREF_LOG_LEVEL = PREF_BRANCH_LOG + "level";
|
||||
const PREF_LOG_DUMP = PREF_BRANCH_LOG + "dump";
|
||||
const PREF_CACHED_CLIENTID = PREF_BRANCH + "cachedClientID";
|
||||
const PREF_FHR_ENABLED = "datareporting.healthreport.service.enabled";
|
||||
const PREF_FHR_UPLOAD_ENABLED = "datareporting.healthreport.uploadEnabled";
|
||||
const PREF_SESSIONS_BRANCH = "datareporting.sessions.";
|
||||
const PREF_UNIFIED = PREF_BRANCH + "unified";
|
||||
@ -706,15 +705,6 @@ var Impl = {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
// Only initialize the session recorder if FHR is enabled.
|
||||
// TODO: move this after the |enableTelemetryRecording| block and drop the
|
||||
// PREF_FHR_ENABLED check once we permanently switch over to unified Telemetry.
|
||||
if (!this._sessionRecorder &&
|
||||
(Preferences.get(PREF_FHR_ENABLED, true) || IS_UNIFIED_TELEMETRY)) {
|
||||
this._sessionRecorder = new SessionRecorder(PREF_SESSIONS_BRANCH);
|
||||
this._sessionRecorder.onStartup();
|
||||
}
|
||||
|
||||
// This will trigger displaying the datachoices infobar.
|
||||
TelemetryReportingPolicy.setup();
|
||||
|
||||
@ -723,6 +713,12 @@ var Impl = {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
// Initialize the session recorder.
|
||||
if (!this._sessionRecorder) {
|
||||
this._sessionRecorder = new SessionRecorder(PREF_SESSIONS_BRANCH);
|
||||
this._sessionRecorder.onStartup();
|
||||
}
|
||||
|
||||
this._attachObservers();
|
||||
|
||||
// For very short session durations, we may never load the client
|
||||
|
12
toolkit/components/telemetry/healthreport-prefs.js
Normal file
12
toolkit/components/telemetry/healthreport-prefs.js
Normal file
@ -0,0 +1,12 @@
|
||||
#filter substitution
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
pref("datareporting.healthreport.infoURL", "https://www.mozilla.org/legal/privacy/firefox.html#health-report");
|
||||
|
||||
// Health Report is enabled by default on all channels.
|
||||
pref("datareporting.healthreport.uploadEnabled", true);
|
||||
|
||||
pref("datareporting.healthreport.about.reportUrl", "https://fhr.cdn.mozilla.net/%LOCALE%/v4/");
|
||||
pref("datareporting.healthreport.about.reportUrlUnified", "https://fhr.cdn.mozilla.net/%LOCALE%/v4/");
|
@ -31,7 +31,6 @@ const PREF_BRANCH = "toolkit.telemetry.";
|
||||
const PREF_ENABLED = PREF_BRANCH + "enabled";
|
||||
const PREF_ARCHIVE_ENABLED = PREF_BRANCH + "archive.enabled";
|
||||
const PREF_FHR_UPLOAD_ENABLED = "datareporting.healthreport.uploadEnabled";
|
||||
const PREF_FHR_SERVICE_ENABLED = "datareporting.healthreport.service.enabled";
|
||||
const PREF_UNIFIED = PREF_BRANCH + "unified";
|
||||
const PREF_OPTOUT_SAMPLE = PREF_BRANCH + "optoutSample";
|
||||
|
||||
@ -100,7 +99,6 @@ function run_test() {
|
||||
|
||||
Services.prefs.setBoolPref(PREF_ENABLED, true);
|
||||
Services.prefs.setBoolPref(PREF_FHR_UPLOAD_ENABLED, true);
|
||||
Services.prefs.setBoolPref(PREF_FHR_SERVICE_ENABLED, true);
|
||||
|
||||
Telemetry.asyncFetchTelemetryData(wrapWithExceptionHandler(run_next_test));
|
||||
}
|
||||
|
@ -17,7 +17,6 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm", this);
|
||||
|
||||
const PREF_BRANCH = "toolkit.telemetry.";
|
||||
const PREF_SERVER = PREF_BRANCH + "server";
|
||||
const PREF_DRS_ENABLED = "datareporting.healthreport.service.enabled";
|
||||
|
||||
const TEST_CHANNEL = "TestChannelABC";
|
||||
|
||||
@ -47,8 +46,6 @@ function run_test() {
|
||||
loadAddonManager("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9.2");
|
||||
|
||||
Services.prefs.setBoolPref(PREF_TELEMETRY_ENABLED, true);
|
||||
// We need to disable FHR in order to use the policy from telemetry.
|
||||
Services.prefs.setBoolPref(PREF_DRS_ENABLED, false);
|
||||
// Don't bypass the notifications in this test, we'll fake it.
|
||||
Services.prefs.setBoolPref(PREF_BYPASS_NOTIFICATION, false);
|
||||
|
||||
|
@ -63,7 +63,6 @@ const MS_IN_ONE_DAY = 24 * MS_IN_ONE_HOUR;
|
||||
const PREF_BRANCH = "toolkit.telemetry.";
|
||||
const PREF_SERVER = PREF_BRANCH + "server";
|
||||
const PREF_FHR_UPLOAD_ENABLED = "datareporting.healthreport.uploadEnabled";
|
||||
const PREF_FHR_SERVICE_ENABLED = "datareporting.healthreport.service.enabled";
|
||||
|
||||
const DATAREPORTING_DIR = "datareporting";
|
||||
const ABORTED_PING_FILE_NAME = "aborted-session-ping";
|
||||
|
Loading…
Reference in New Issue
Block a user