@@ -26,11 +26,18 @@ XPCOMUtils.defineLazyModuleGetters(this, {
2626 ShellService : "resource:///modules/ShellService.jsm" ,
2727 UpdatePing : "resource://gre/modules/UpdatePing.jsm" ,
2828} ) ;
29- XPCOMUtils . defineLazyServiceGetters ( this , {
30- UpdateManager : [ "@mozilla.org/updates/update-manager;1" , "nsIUpdateManager" ] ,
31- WinTaskbar : [ "@mozilla.org/windows-taskbar;1" , "nsIWinTaskbar" ] ,
32- WindowsUIUtils : [ "@mozilla.org/windows-ui-utils;1" , "nsIWindowsUIUtils" ] ,
33- } ) ;
29+ XPCOMUtils . defineLazyServiceGetter (
30+ this ,
31+ "WindowsUIUtils" ,
32+ "@mozilla.org/windows-ui-utils;1" ,
33+ "nsIWindowsUIUtils"
34+ ) ;
35+ XPCOMUtils . defineLazyServiceGetter (
36+ this ,
37+ "UpdateManager" ,
38+ "@mozilla.org/updates/update-manager;1" ,
39+ "nsIUpdateManager"
40+ ) ;
3441
3542XPCOMUtils . defineLazyGetter ( this , "gSystemPrincipal" , ( ) =>
3643 Services . scriptSecurityManager . getSystemPrincipal ( )
@@ -41,11 +48,6 @@ XPCOMUtils.defineLazyGlobalGetters(this, [URL]);
4148const ONCE_DOMAINS = [ "mozilla.org" , "firefox.com" ] ;
4249const ONCE_PREF = "browser.startup.homepage_override.once" ;
4350
44- // Index of Private Browsing icon in firefox.exe
45- // Must line up with the one in nsNativeAppSupportWin.h.
46- const PRIVATE_BROWSING_ICON_INDEX = 5 ;
47- const PRIVACY_SEGMENTATION_PREF = "browser.privacySegmentation.enabled" ;
48-
4951function shouldLoadURI ( aURI ) {
5052 if ( aURI && ! aURI . schemeIs ( "chrome" ) ) {
5153 return true ;
@@ -274,20 +276,6 @@ function openBrowserWindow(
274276 win . docShell . QueryInterface (
275277 Ci . nsILoadContext
276278 ) . usePrivateBrowsing = true ;
277- if ( Services . prefs . getBoolPref ( PRIVACY_SEGMENTATION_PREF ) ) {
278- // TODO: Changing this after the Window has been painted causes it to
279- // change Taskbar icons if the original one had a different AUMID.
280- // This must stay pref'ed off until this is resolved.
281- // https://bugzilla.mozilla.org/show_bug.cgi?id=1751010
282- WinTaskbar . setGroupIdForWindow ( win , WinTaskbar . defaultPrivateGroupId ) ;
283- WindowsUIUtils . setWindowIconFromExe (
284- win ,
285- Services . dirsvc . get ( "XREExeF" , Ci . nsIFile ) . path ,
286- // This corresponds to the definitions in
287- // nsNativeAppSupportWin.h
288- PRIVATE_BROWSING_ICON_INDEX
289- ) ;
290- }
291279 }
292280
293281 let openTime = win . openTime ;
0 commit comments