Merge remote-tracking branch 'origin/tracking' into custom

This commit is contained in:
roytam1 2023-10-18 11:48:06 +08:00
commit ecd3cd8676
53 changed files with 67 additions and 1452 deletions

View file

@ -51,11 +51,6 @@ Cu.import("resource://gre/modules/NotificationDB.jsm");
["webrtcUI", "resource:///modules/webrtcUI.jsm", ]
].forEach(([name, resource]) => XPCOMUtils.defineLazyModuleGetter(this, name, resource));
#ifdef MOZ_SAFE_BROWSING
XPCOMUtils.defineLazyModuleGetter(this, "SafeBrowsing",
"resource://gre/modules/SafeBrowsing.jsm");
#endif
// lazy service getters
[
["Favicons", "@mozilla.org/browser/favicon-service;1", "mozIAsyncFavicons"],
@ -982,7 +977,6 @@ var gBrowserInit = {
BrowserOnClick.init();
FeedHandler.init();
AboutPrivateBrowsingListener.init();
TrackingProtection.init();
RefreshBlocker.init();
CaptivePortalWatcher.init();
@ -1201,11 +1195,6 @@ var gBrowserInit = {
}
}
#ifdef MOZ_SAFE_BROWSING
// Bug 778855 - Perf regression if we do this here. To be addressed in bug 779008.
setTimeout(function() { SafeBrowsing.init(); }, 2000);
#endif
Services.obs.addObserver(gIdentityHandler, "perm-changed", false);
Services.obs.addObserver(gSessionHistoryObserver, "browser:purge-session-history", false);
Services.obs.addObserver(gXPInstallObserver, "addon-install-disabled", false);
@ -1475,8 +1464,6 @@ var gBrowserInit = {
FeedHandler.uninit();
TrackingProtection.uninit();
RefreshBlocker.uninit();
CaptivePortalWatcher.uninit();
@ -4282,7 +4269,6 @@ var XULBrowserWindow = {
uri = Services.uriFixup.createExposableURI(uri);
} catch (e) {}
gIdentityHandler.updateIdentity(this._state, uri);
TrackingProtection.onSecurityChange(this._state, aIsSimulated);
},
// simulate all change notifications after switching tabs
@ -7738,12 +7724,6 @@ var AboutPrivateBrowsingListener = {
msg => {
OpenBrowserWindow({private: true});
});
window.messageManager.addMessageListener(
"AboutPrivateBrowsing:ToggleTrackingProtection",
msg => {
const PREF = "privacy.trackingprotection.pbmode.enabled";
Services.prefs.setBoolPref(PREF, !Services.prefs.getBoolPref(PREF));
});
}
};