Bug 388909 - fix build breakage from 384374 for MOZ_RDF-disabled builds
p=romaxa <romaxa@gmail.com>
r+sr=biesi
--- a/uriloader/exthandler/nsExternalHelperAppService.cpp
+++ b/uriloader/exthandler/nsExternalHelperAppService.cpp
@@ -995,22 +995,22 @@ nsresult nsExternalHelperAppService::Fil
return FillHandlerInfoForTypeFromDS(typeNodeResource.get(), type, rdf,
NC_SCHEME_NODE_PREFIX, aHandlerInfo);
#else
return NS_ERROR_NOT_AVAILABLE;
#endif
}
+#ifdef MOZ_RDF
nsresult nsExternalHelperAppService::FillHandlerInfoForTypeFromDS(
nsIRDFResource *aTypeNodeResource, const nsCAutoString &aType,
nsIRDFService *rdf, const char *aTypeNodePrefix,
nsIHandlerInfo * aHandlerInfo)
{
-#ifdef MOZ_RDF
// we need a way to determine if this type resource is really in the graph
// or not... Test that there's a #value arc from the type resource to the
// type literal string.
nsCOMPtr<nsIRDFLiteral> typeLiteral;
NS_ConvertUTF8toUTF16 UTF16Type(aType);
nsresult rv = rdf->GetLiteral( UTF16Type.get(),
getter_AddRefs( typeLiteral ) );
@@ -1035,20 +1035,18 @@ nsresult nsExternalHelperAppService::Fil
} // if we have a node in the graph for this content type
// If we had success, but entry doesn't exist, we don't want to return success
else if (NS_SUCCEEDED(rv)) {
rv = NS_ERROR_NOT_AVAILABLE;
}
return rv;
-#else
- return NS_ERROR_NOT_AVAILABLE;
+}
#endif /* MOZ_RDF */
-}
nsresult nsExternalHelperAppService::FillMIMEInfoForExtensionFromDS(
const nsACString& aFileExtension, nsIMIMEInfo * aMIMEInfo)
{
nsCAutoString type;
PRBool found = GetTypeFromDS(aFileExtension, type);
if (!found)
return NS_ERROR_NOT_AVAILABLE;
--- a/uriloader/exthandler/nsExternalHelperAppService.h
+++ b/uriloader/exthandler/nsExternalHelperAppService.h
@@ -135,30 +135,32 @@ public:
* any user override info from the in-memory data source.
*
* @param aScheme The protocol scheme
* @param aMIMEInfo The mime info to fill with the information
*/
NS_HIDDEN_(nsresult) FillProtoInfoForSchemeFromDS(
const nsACString& aScheme, nsIHandlerInfo * aMIMEInfo);
+#ifdef MOZ_RDF
/**
* Fill in the generic handler info stuff; called by Fill*InfoFor*FromDS.
*
* @param aTypeNodeResource RDF resource representing the top level scheme
* or MIME-type node in the graph
* @param aType content-type or scheme name
* @param aRDFService the RDF service
* @param aTypeNodePrefix One of NC_{CONTENT,SCHEME}_NODE_PREFIX
* @param aHandlerInfo object to be filled in
*/
NS_HIDDEN_(nsresult) FillHandlerInfoForTypeFromDS(
nsIRDFResource *aTypeNodeResource, const nsCAutoString& aType,
nsIRDFService *aRDFService, const char *aTypeNodePrefix,
nsIHandlerInfo * aHandlerInfo);
+#endif
/**
* Given an extension, look up the user override information to see if we
* have a mime info object representing this extension. The user over ride
* information is contained in an in-memory data source.
*
* Does not change the MIME Type of the MIME Info.
*