147679 GetFromMIMEType on Windows only gets one extension and needs rethinking r=bzbarsky sr=darin

this merges nsIMIMEService::GetFromType and GetFromExtension


git-svn-id: svn://10.0.0.236/trunk@145198 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
cbiesinger%web.de
2003-07-25 16:48:00 +00:00
parent 6fa5a7f31e
commit 72ffd605aa
27 changed files with 894 additions and 777 deletions

View File

@@ -1285,7 +1285,7 @@ nsWebBrowserPersist::GetExtensionForContentType(const PRUnichar *aContentType, P
nsCOMPtr<nsIMIMEInfo> mimeInfo;
nsCAutoString contentType;
contentType.AssignWithConversion(aContentType);
mMIMEService->GetFromMIMEType(contentType.get(), getter_AddRefs(mimeInfo));
mMIMEService->GetFromTypeAndExtension(contentType.get(), nsnull, getter_AddRefs(mimeInfo));
if (mimeInfo)
{
nsXPIDLCString ext;
@@ -2058,8 +2058,8 @@ nsWebBrowserPersist::CalculateAndAppendFileExt(nsIURI *aURI, nsIChannel *aChanne
if (!contentType.IsEmpty())
{
nsCOMPtr<nsIMIMEInfo> mimeInfo;
mMIMEService->GetFromMIMEType(
contentType.get(), getter_AddRefs(mimeInfo));
mMIMEService->GetFromTypeAndExtension(
contentType.get(), nsnull, getter_AddRefs(mimeInfo));
nsCOMPtr<nsILocalFile> localFile;
GetLocalFileFromURI(aURI, getter_AddRefs(localFile));