Bug 1862450 - Made installer changes for dual browser extension to MacOS r=mhughes
Depends on D192478 Differential Revision: https://phabricator.services.mozilla.com/D192897
This commit is contained in:
@@ -543,7 +543,15 @@ nsBrowserContentHandler.prototype = {
|
||||
"private-window",
|
||||
false
|
||||
);
|
||||
if (privateWindowParam) {
|
||||
// Check for Firefox private browsing protocol handler here.
|
||||
let privateProtocolFound = false;
|
||||
let urlFlagIdx = cmdLine.findFlag("url", false);
|
||||
if (urlFlagIdx > -1 && cmdLine.length > 1) {
|
||||
privateProtocolFound = cmdLine
|
||||
.getArgument(urlFlagIdx + 1)
|
||||
.startsWith("firefox-private:");
|
||||
}
|
||||
if (privateWindowParam || privateProtocolFound) {
|
||||
let forcePrivate = true;
|
||||
let resolvedURI;
|
||||
if (!lazy.PrivateBrowsingUtils.enabled) {
|
||||
@@ -551,6 +559,10 @@ nsBrowserContentHandler.prototype = {
|
||||
// access to private browsing has been disabled.
|
||||
forcePrivate = false;
|
||||
resolvedURI = Services.io.newURI("about:privatebrowsing");
|
||||
} else if (privateProtocolFound) {
|
||||
// We can safely remove the flag and parameter now.
|
||||
const privateProtocolURI = cmdLine.handleFlagWithParam("url", false);
|
||||
resolvedURI = resolveURIInternal(cmdLine, privateProtocolURI);
|
||||
} else {
|
||||
resolvedURI = resolveURIInternal(cmdLine, privateWindowParam);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user