Backed out 3 changesets (bug 1743914) for bc failures on browser_setDefaultPDFHandler.js

Backed out changeset 088401e43bd4 (bug 1743914)
Backed out changeset 7cb74ac80d41 (bug 1743914)
Backed out changeset 20713ede0c08 (bug 1743914)
This commit is contained in:
Narcis Beleuzu
2021-12-11 03:28:02 +02:00
parent 3e13d9b68d
commit bfb7e382db
13 changed files with 16 additions and 349 deletions

View File

@@ -207,32 +207,6 @@ nsWindowsShellService::IsDefaultBrowser(bool aForAllTypes,
return NS_OK;
}
NS_IMETHODIMP
nsWindowsShellService::IsDefaultHandlerFor(
const nsAString& aFileExtensionOrProtocol, bool* aIsDefaultHandlerFor) {
*aIsDefaultHandlerFor = false;
RefPtr<IApplicationAssociationRegistration> pAAR;
HRESULT hr = CoCreateInstance(
CLSID_ApplicationAssociationRegistration, nullptr, CLSCTX_INPROC,
IID_IApplicationAssociationRegistration, getter_AddRefs(pAAR));
if (FAILED(hr)) {
return NS_OK;
}
wchar_t exePath[MAXPATHLEN] = L"";
nsresult rv = BinaryPath::GetLong(exePath);
if (NS_FAILED(rv)) {
return NS_OK;
}
const nsString& flatClass = PromiseFlatString(aFileExtensionOrProtocol);
*aIsDefaultHandlerFor = IsPathDefaultForClass(pAAR, exePath, flatClass.get());
return NS_OK;
}
nsresult nsWindowsShellService::LaunchControlPanelDefaultsSelectionUI() {
IApplicationAssociationRegistrationUI* pAARUI;
HRESULT hr = CoCreateInstance(