mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
Bug 391380 - moz-icon: launches handler dialog. r=bzbarsky, sr=dmose, a=bzbarsky
This commit is contained in:
parent
4f27bf89e3
commit
6e7b96f69f
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user