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:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user