Bug 1801224 - Invoke window modal for new users on first startup r=pdahiya

Differential Revision: https://phabricator.services.mozilla.com/D162904
This commit is contained in:
negin
2022-12-16 15:32:10 +00:00
parent 96b6c8e7ec
commit cdcf0f8de5
7 changed files with 96 additions and 1 deletions

View File

@@ -93,6 +93,7 @@ function resolveURIInternal(aCmdLine, aArgument) {
let gKiosk = false;
let gMajorUpgrade = false;
let gFirstRunProfile = false;
var gFirstWindow = false;
const OVERRIDE_NONE = 0;
@@ -675,6 +676,10 @@ nsBrowserContentHandler.prototype = {
switch (override) {
case OVERRIDE_NEW_PROFILE:
// New profile.
gFirstRunProfile = true;
if (lazy.NimbusFeatures.aboutwelcome.getVariable("showModal")) {
break;
}
overridePage = Services.urlFormatter.formatURLPref(
"startup.homepage_welcome_url"
);
@@ -861,6 +866,14 @@ nsBrowserContentHandler.prototype = {
gMajorUpgrade = val;
},
get firstRunProfile() {
return gFirstRunProfile;
},
set firstRunProfile(val) {
gFirstRunProfile = val;
},
/* nsIContentHandler */
handleContent: function bch_handleContent(contentType, context, request) {