зеркало из https://github.com/mozilla/pjs.git
[OS/2] Bug 388701: supplemental build fix for OS/2, r=cbiesinger, sr=dmose
This commit is contained in:
Родитель
d6d9fa2ff0
Коммит
b657aadcc2
|
@ -1502,6 +1502,27 @@ nsOSHelperAppService::GetMIMEInfoFromOS(const nsACString& aType,
|
|||
return retval;
|
||||
}
|
||||
|
||||
already_AddRefed<nsIHandlerInfo>
|
||||
nsOSHelperAppService::GetProtocolInfoFromOS(const nsACString &aScheme)
|
||||
{
|
||||
NS_ASSERTION(!aScheme.IsEmpty(), "No scheme was specified!");
|
||||
|
||||
PRBool exists;
|
||||
nsresult rv = OSProtocolHandlerExists(nsPromiseFlatCString(aScheme).get(),
|
||||
&exists);
|
||||
NS_ENSURE_SUCCESS(rv, nsnull);
|
||||
|
||||
nsMIMEInfoOS2 *handlerInfo = new nsMIMEInfoOS2();
|
||||
NS_ENSURE_TRUE(handlerInfo, nsnull);
|
||||
NS_ADDREF(handlerInfo);
|
||||
|
||||
nsAutoString desc;
|
||||
GetApplicationDescription(aScheme, desc);
|
||||
handlerInfo->SetDefaultDescription(desc);
|
||||
|
||||
return handlerInfo;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsOSHelperAppService::GetApplicationDescription(const nsACString& aScheme, nsAString& _retval)
|
||||
|
|
|
@ -62,6 +62,7 @@ public:
|
|||
already_AddRefed<nsIMIMEInfo> GetMIMEInfoFromOS(const nsACString& aMimeType,
|
||||
const nsACString& aFileExt,
|
||||
PRBool *aFound);
|
||||
already_AddRefed<nsIHandlerInfo> GetProtocolInfoFromOS(const nsACString &aScheme);
|
||||
|
||||
// override nsIExternalProtocolService methods
|
||||
NS_IMETHODIMP GetApplicationDescription(const nsACString& aScheme, nsAString& _retval);
|
||||
|
|
Загрузка…
Ссылка в новой задаче