Backing out fix to bug 163568 to fix bug 169991, r=darin, sr=bzbarsky, a=dbaron

This commit is contained in:
peterlubczynski%netscape.com 2002-10-21 02:05:59 +00:00
parent 49a4d65249
commit 2751ea016b

View File

@ -140,7 +140,6 @@
#include "nsIWebBrowserChromeFocus.h"
#include "nsPluginError.h"
#include "nsIURL.h"
static NS_DEFINE_IID(kDeviceContextCID, NS_DEVICE_CONTEXT_CID);
static NS_DEFINE_CID(kSimpleURICID, NS_SIMPLEURI_CID);
@ -4456,26 +4455,6 @@ nsDocShell::NewContentViewerObj(const char *aContentType,
nsCOMPtr<nsIPluginHost> pluginHost (do_GetService(kPluginManagerCID));
nsCOMPtr<nsIChannel> aOpenedChannel = do_QueryInterface(request);
// check plugins to see if there is an override mime type for this extension
if (pluginHost &&
NS_FAILED(pluginHost->IsPluginEnabledForType(aContentType))) {
// get the extension from the url which we get from the channel
nsCOMPtr<nsIURI> uri;
if (NS_SUCCEEDED(aOpenedChannel->GetURI(getter_AddRefs(uri)))) {
nsCOMPtr<nsIURL> url = do_QueryInterface(uri);
if (url) {
nsCAutoString fileExtension;
url->GetFileExtension(fileExtension);
if (!fileExtension.IsEmpty()) {
// ask the plugin host for a mime type for this extension
const char* pluginMimeType;
if (NS_SUCCEEDED(pluginHost->IsPluginEnabledForExtension(fileExtension.get(), pluginMimeType)))
aContentType = pluginMimeType;
}
}
}
}
//XXX This should probably be some category thing....
nsCAutoString contractId(NS_DOCUMENT_LOADER_FACTORY_CONTRACTID_PREFIX
"view"