Skip to content

Commit

Permalink
Bug 1858729 - Add Edge identifier AppXd4nrz8ff68srnhf9t5a8sbjyar1cr72…
Browse files Browse the repository at this point in the history
…3 r=nalexander

Differential Revision: https://phabricator.services.mozilla.com/D190982
  • Loading branch information
Robin Steuber committed Dec 13, 2023
1 parent 575df5d commit 5e115d3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions browser/components/shell/ShellService.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ let ShellServiceInternal = {
getDefaultPDFHandler() {
const knownBrowserPrefixes = [
"AppXq0fevzme2pys62n3e0fbqa7peapykr8v", // Edge before Blink, per https://stackoverflow.com/a/32724723.
"AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723", // Another pre-Blink Edge identifier. See Bug 1858729.
"Brave", // For "BraveFile".
"Chrome", // For "ChromeHTML".
"Firefox", // For "FirefoxHTML-*" or "FirefoxPDF-*". Need to take from other installations of Firefox!
Expand Down
13 changes: 9 additions & 4 deletions toolkit/mozapps/defaultagent/DefaultBrowser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,16 @@ static BrowserResult GetDefaultBrowser() {
// "AppX[hash]" as expected. It is unclear if the EdgeWithEdgeHTML and
// EdgeWithBlink ProgIDs would differ if the latter is changed into a
// package containing Edge.
constexpr std::wstring_view progIdEdgeHtml{
constexpr std::wstring_view progIdEdgeHtml1{
L"AppXq0fevzme2pys62n3e0fbqa7peapykr8v"};

if (!wcsnicmp(registeredApp.get(), progIdEdgeHtml.data(),
progIdEdgeHtml.length())) {
// Apparently there is at least one other ProgID used by EdgeHTML Edge.
constexpr std::wstring_view progIdEdgeHtml2{
L"AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723"};

if (!wcsnicmp(registeredApp.get(), progIdEdgeHtml1.data(),
progIdEdgeHtml1.length()) ||
!wcsnicmp(registeredApp.get(), progIdEdgeHtml2.data(),
progIdEdgeHtml2.length())) {
return Browser::EdgeWithEdgeHTML;
}
}
Expand Down

0 comments on commit 5e115d3

Please sign in to comment.