Skip to content

Commit ed4adb0

Browse files
Bug 1870047, Bug 1870895 - Fix for 1-click set to default on MSIX builds causing the default browser to become Edge r=nalexander
This is a revision to remove the functionality that was added over 3 or 4 previous revisions to ultimately use Powershell to set the default browser in MSIX builds. On Windows with a new feature enabled by Microsoft, this results in the HTTP and HTTPS handler being reset to Edge, which is a terrible experience. Since there's no solve, this is rolling that all back. Done as one set of changes here because it's all deleted code except for one line, a rollback isn't clean, and it would change the Javascript side to be non-async again, which isn't necessary. This will effectively be reopening Bug 1818418 - Allow to use Windows UserChoice default mechanisms for MSIX packages. All of the bugs created in between were side effects of that change / fix. I will not reopen that bug because we don't plan to fix it. Microsoft is rolling out new changes that explicitly disallow that mechanism. When it hits 100%, it won't work on any build type (MSIX or not). Differential Revision: https://phabricator.services.mozilla.com/D197747
1 parent 3b64a17 commit ed4adb0

File tree

3 files changed

+4
-416
lines changed

3 files changed

+4
-416
lines changed

browser/components/shell/WindowsUserChoice.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -284,21 +284,6 @@ UniquePtr<wchar_t[]> GetAssociationKeyPath(const wchar_t* aExt) {
284284
return keyPath;
285285
}
286286

287-
nsresult AppendAssociationKeyPath(const wchar_t* aExt, nsString& output) {
288-
if (aExt[0] == L'.') {
289-
output.AppendLiteral(
290-
u"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts\\");
291-
} else {
292-
output.AppendLiteral(
293-
u"SOFTWARE\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations"
294-
u"\\");
295-
}
296-
297-
output.Append(aExt);
298-
299-
return NS_OK;
300-
}
301-
302287
UniquePtr<wchar_t[]> GenerateUserChoiceHash(const wchar_t* aExt,
303288
const wchar_t* aUserSid,
304289
const wchar_t* aProgId,

browser/components/shell/WindowsUserChoice.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,6 @@ CheckUserChoiceHashResult CheckUserChoiceHash(const wchar_t* aExt,
6161
*/
6262
mozilla::UniquePtr<wchar_t[]> GetAssociationKeyPath(const wchar_t* aExt);
6363

64-
/*
65-
* Appends the registry path for the given association, file extension or
66-
* protocol to the parameter string.
67-
*
68-
* @return The path, or nullptr on failure.
69-
*/
70-
nsresult AppendAssociationKeyPath(const wchar_t* aExt, nsString& output);
71-
7264
/*
7365
* Get the current user's SID
7466
*

0 commit comments

Comments
 (0)