summaryrefslogtreecommitdiff
path: root/dom
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2017-07-25 15:22:44 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-02-12 15:38:00 +0100
commit4cda63fe3f2e6b3661790cd519843d1bd13df56f (patch)
tree9d97739792ebf371dd6d57e1e0296fd5353a7dee /dom
parent814bfaddb9bd3d27bfb51e6229db9547177fe159 (diff)
downloaduxp-4cda63fe3f2e6b3661790cd519843d1bd13df56f.tar.gz
Remove flash-only plugin pref.
Tag issue #38.
Diffstat (limited to 'dom')
-rw-r--r--dom/plugins/base/nsPluginHost.cpp21
1 files changed, 1 insertions, 20 deletions
diff --git a/dom/plugins/base/nsPluginHost.cpp b/dom/plugins/base/nsPluginHost.cpp
index 6ee23f38bc..ca2871609a 100644
--- a/dom/plugins/base/nsPluginHost.cpp
+++ b/dom/plugins/base/nsPluginHost.cpp
@@ -2078,22 +2078,6 @@ nsPluginHost::AddPluginTag(nsPluginTag* aPluginTag)
}
}
-static bool
-PluginInfoIsFlash(const nsPluginInfo& info)
-{
- if (!info.fName || strcmp(info.fName, "Shockwave Flash") != 0) {
- return false;
- }
- for (uint32_t i = 0; i < info.fVariantCount; ++i) {
- if (info.fMimeTypeArray[i] &&
- (!strcmp(info.fMimeTypeArray[i], "application/x-shockwave-flash") ||
- !strcmp(info.fMimeTypeArray[i], "application/x-shockwave-flash-test"))) {
- return true;
- }
- }
- return false;
-}
-
typedef NS_NPAPIPLUGIN_CALLBACK(char *, NP_GETMIMEDESCRIPTION)(void);
nsresult nsPluginHost::ScanPluginsDirectory(nsIFile *pluginsDir,
@@ -2114,8 +2098,6 @@ nsresult nsPluginHost::ScanPluginsDirectory(nsIFile *pluginsDir,
("nsPluginHost::ScanPluginsDirectory dir=%s\n", dirPath.get()));
#endif
- bool flashOnly = Preferences::GetBool("plugin.load_flash_only", true);
-
nsCOMPtr<nsISimpleEnumerator> iter;
rv = pluginsDir->GetDirectoryEntries(getter_AddRefs(iter));
if (NS_FAILED(rv))
@@ -2218,8 +2200,7 @@ nsresult nsPluginHost::ScanPluginsDirectory(nsIFile *pluginsDir,
res = pluginFile.GetPluginInfo(info, &library);
}
// if we don't have mime type don't proceed, this is not a plugin
- if (NS_FAILED(res) || !info.fMimeTypeArray ||
- (flashOnly && !PluginInfoIsFlash(info))) {
+ if (NS_FAILED(res) || !info.fMimeTypeArray) {
RefPtr<nsInvalidPluginTag> invalidTag = new nsInvalidPluginTag(filePath.get(),
fileModTime);
pluginFile.FreePluginInfo(info);