зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1844908 - Remove pre-Win10-specific codepath from uriloader/exthandler/. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D184306
This commit is contained in:
Родитель
fe7eca4ab3
Коммит
f85d1878c5
|
@ -17,7 +17,6 @@
|
|||
#include "nsIWindowsRegKey.h"
|
||||
#include "nsXULAppAPI.h"
|
||||
#include "mozilla/UniquePtrExtensions.h"
|
||||
#include "mozilla/WindowsVersion.h"
|
||||
|
||||
// shellapi.h is needed to build with WIN32_LEAN_AND_MEAN
|
||||
#include <shellapi.h>
|
||||
|
@ -119,23 +118,21 @@ NS_IMETHODIMP nsOSHelperAppService::GetApplicationDescription(
|
|||
|
||||
NS_ConvertASCIItoUTF16 buf(aScheme);
|
||||
|
||||
if (mozilla::IsWin8OrLater()) {
|
||||
wchar_t result[1024];
|
||||
DWORD resultSize = 1024;
|
||||
HRESULT hr = AssocQueryString(0x1000 /* ASSOCF_IS_PROTOCOL */,
|
||||
ASSOCSTR_FRIENDLYAPPNAME, buf.get(), NULL,
|
||||
result, &resultSize);
|
||||
if (SUCCEEDED(hr)) {
|
||||
_retval = result;
|
||||
return NS_OK;
|
||||
}
|
||||
wchar_t result[1024];
|
||||
DWORD resultSize = 1024;
|
||||
HRESULT hr = AssocQueryString(0x1000 /* ASSOCF_IS_PROTOCOL */,
|
||||
ASSOCSTR_FRIENDLYAPPNAME, buf.get(), NULL,
|
||||
result, &resultSize);
|
||||
if (SUCCEEDED(hr)) {
|
||||
_retval = result;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_ENSURE_TRUE(mAppAssoc, NS_ERROR_NOT_AVAILABLE);
|
||||
wchar_t* pResult = nullptr;
|
||||
// We are responsible for freeing returned strings.
|
||||
HRESULT hr = mAppAssoc->QueryCurrentDefault(buf.get(), AT_URLPROTOCOL,
|
||||
AL_EFFECTIVE, &pResult);
|
||||
hr = mAppAssoc->QueryCurrentDefault(buf.get(), AT_URLPROTOCOL, AL_EFFECTIVE,
|
||||
&pResult);
|
||||
if (SUCCEEDED(hr)) {
|
||||
nsCOMPtr<nsIFile> app;
|
||||
nsAutoString appInfo(pResult);
|
||||
|
|
Загрузка…
Ссылка в новой задаче