Bug 391380 - moz-icon: launches handler dialog. r=bzbarsky, sr=dmose, a=bzbarsky

This commit is contained in:
sdwilsh@shawnwilsher.com 2007-08-09 15:21:54 -07:00
Родитель 4f27bf89e3
Коммит 6e7b96f69f
2 изменённых файлов: 7 добавлений и 3 удалений

Просмотреть файл

@ -521,6 +521,7 @@ pref("network.protocol-handler.external.help", false);
pref("network.protocol-handler.external.disk", false);
pref("network.protocol-handler.external.disks", false);
pref("network.protocol-handler.external.afp", false);
pref("network.protocol-handler.external.moz-icon", false);
// An exposed protocol handler is one that can be used in all contexts. A
// non-exposed protocol handler is one that can only be used internally by the

Просмотреть файл

@ -1136,12 +1136,15 @@ nsresult nsExternalHelperAppService::GetFileTokenForPath(const PRUnichar * aPlat
NS_IMETHODIMP nsExternalHelperAppService::ExternalProtocolHandlerExists(const char * aProtocolScheme,
PRBool * aHandlerExists)
{
// if we've got handler info in the datasource, that means that at least one
// web handler exists
nsCOMPtr<nsIHandlerInfo> handlerInfo;
nsresult rv = GetProtocolHandlerInfo(
nsDependentCString(aProtocolScheme), getter_AddRefs(handlerInfo));
if (NS_SUCCEEDED(rv)) {
NS_ENSURE_SUCCESS(rv, rv);
// See if we have a preferred handler app for this
nsCOMPtr<nsIHandlerApp> preferredApp;
handlerInfo->GetPreferredApplicationHandler(getter_AddRefs(preferredApp));
if (preferredApp) {
*aHandlerExists = PR_TRUE;
return NS_OK;
}