Loading services/settings/remote-settings.sys.mjs +1 −6 Original line number Diff line number Diff line Loading @@ -198,17 +198,12 @@ function remoteSettingsFunction() { return; } // When running in full mode, we ignore last polling status. if (full || AppConstants.BASE_BROWSER_VERSION) { if (full) { lazy.gPrefs.clearUserPref(PREF_SETTINGS_SERVER_BACKOFF); lazy.gPrefs.clearUserPref(PREF_SETTINGS_LAST_UPDATE); lazy.gPrefs.clearUserPref(PREF_SETTINGS_LAST_ETAG); } if (AppConstants.BASE_BROWSER_VERSION) { // tor-browser#41704: pollChanges is always online, so do not allow it. return; } let pollTelemetryArgs = { source: TELEMETRY_SOURCE_POLL, trigger, Loading toolkit/modules/IgnoreLists.sys.mjs +7 −13 Original line number Diff line number Diff line Loading @@ -5,16 +5,18 @@ const lazy = {}; ChromeUtils.defineESModuleGetters(lazy, { RemoteSettings: "resource://services-settings/remote-settings.sys.mjs", RemoteSettingsClient: "resource://services-settings/RemoteSettingsClient.sys.mjs", }); class IgnoreListsManager { _ignoreListSettings = null; const SETTINGS_IGNORELIST_KEY = "hijack-blocklists"; class IgnoreListsManager { async init() { // TODO: Restore the initialization, once we use only the local dumps for // the remote settings. if (!this._ignoreListSettings) { this._ignoreListSettings = lazy.RemoteSettings(SETTINGS_IGNORELIST_KEY); } } async getAndSubscribe(listener) { Loading @@ -24,7 +26,7 @@ class IgnoreListsManager { const settings = await this._getIgnoreList(); // Listen for future updates after we first get the values. this._ignoreListSettings?.on("sync", listener); this._ignoreListSettings.on("sync", listener); return settings; } Loading Loading @@ -65,14 +67,6 @@ class IgnoreListsManager { * could be obtained. */ async _getIgnoreListSettings(firstTime = true) { if (!this._ignoreListSettings) { const dump = await fetch( "resource:///defaults/settings/main/hijack-blocklists.json" ); const { data } = await dump.json(); return data; } let result = []; try { result = await this._ignoreListSettings.get({ Loading Loading
services/settings/remote-settings.sys.mjs +1 −6 Original line number Diff line number Diff line Loading @@ -198,17 +198,12 @@ function remoteSettingsFunction() { return; } // When running in full mode, we ignore last polling status. if (full || AppConstants.BASE_BROWSER_VERSION) { if (full) { lazy.gPrefs.clearUserPref(PREF_SETTINGS_SERVER_BACKOFF); lazy.gPrefs.clearUserPref(PREF_SETTINGS_LAST_UPDATE); lazy.gPrefs.clearUserPref(PREF_SETTINGS_LAST_ETAG); } if (AppConstants.BASE_BROWSER_VERSION) { // tor-browser#41704: pollChanges is always online, so do not allow it. return; } let pollTelemetryArgs = { source: TELEMETRY_SOURCE_POLL, trigger, Loading
toolkit/modules/IgnoreLists.sys.mjs +7 −13 Original line number Diff line number Diff line Loading @@ -5,16 +5,18 @@ const lazy = {}; ChromeUtils.defineESModuleGetters(lazy, { RemoteSettings: "resource://services-settings/remote-settings.sys.mjs", RemoteSettingsClient: "resource://services-settings/RemoteSettingsClient.sys.mjs", }); class IgnoreListsManager { _ignoreListSettings = null; const SETTINGS_IGNORELIST_KEY = "hijack-blocklists"; class IgnoreListsManager { async init() { // TODO: Restore the initialization, once we use only the local dumps for // the remote settings. if (!this._ignoreListSettings) { this._ignoreListSettings = lazy.RemoteSettings(SETTINGS_IGNORELIST_KEY); } } async getAndSubscribe(listener) { Loading @@ -24,7 +26,7 @@ class IgnoreListsManager { const settings = await this._getIgnoreList(); // Listen for future updates after we first get the values. this._ignoreListSettings?.on("sync", listener); this._ignoreListSettings.on("sync", listener); return settings; } Loading Loading @@ -65,14 +67,6 @@ class IgnoreListsManager { * could be obtained. */ async _getIgnoreListSettings(firstTime = true) { if (!this._ignoreListSettings) { const dump = await fetch( "resource:///defaults/settings/main/hijack-blocklists.json" ); const { data } = await dump.json(); return data; } let result = []; try { result = await this._ignoreListSettings.get({ Loading