Bug 1405312 - Remove dead code from nsPluginHost; r=jimm

MozReview-Commit-ID: BsZIoTeZrNL

--HG--
extra : rebase_source : dbc6a3edeb0c22fba76ce9b7f74ed02c69a26494
This commit is contained in:
Alex Gaynor 2017-10-03 09:53:08 -04:00
Родитель 2e364d2e38
Коммит 5881f616ec
2 изменённых файлов: 0 добавлений и 27 удалений

Просмотреть файл

@ -127,10 +127,6 @@ using mozilla::dom::FakePluginMimeEntry;
} \ } \
} }
// this is the name of the directory which will be created
// to cache temporary files.
#define kPluginTmpDirName NS_LITERAL_CSTRING("plugtmp")
static const char *kPrefWhitelist = "plugin.allowed_types"; static const char *kPrefWhitelist = "plugin.allowed_types";
static const char *kPrefLoadInParentPrefix = "plugin.load_in_parent_process."; static const char *kPrefLoadInParentPrefix = "plugin.load_in_parent_process.";
static const char *kPrefDisableFullPage = "plugin.disable_full_page_plugin_for_types"; static const char *kPrefDisableFullPage = "plugin.disable_full_page_plugin_for_types";
@ -672,27 +668,6 @@ void nsPluginHost::OnPluginInstanceDestroyed(nsPluginTag* aPluginTag)
} }
} }
nsresult
nsPluginHost::GetPluginTempDir(nsIFile **aDir)
{
if (!sPluginTempDir) {
nsCOMPtr<nsIFile> tmpDir;
nsresult rv = NS_GetSpecialDirectory(NS_OS_TEMP_DIR,
getter_AddRefs(tmpDir));
NS_ENSURE_SUCCESS(rv, rv);
rv = tmpDir->AppendNative(kPluginTmpDirName);
// make it unique, and mode == 0700, not world-readable
rv = tmpDir->CreateUnique(nsIFile::DIRECTORY_TYPE, 0700);
NS_ENSURE_SUCCESS(rv, rv);
tmpDir.swap(sPluginTempDir);
}
return sPluginTempDir->Clone(aDir);
}
nsresult nsresult
nsPluginHost::InstantiatePluginInstance(const nsACString& aMimeType, nsIURI* aURL, nsPluginHost::InstantiatePluginInstance(const nsACString& aMimeType, nsIURI* aURL,
nsObjectLoadingContent *aContent, nsObjectLoadingContent *aContent,

Просмотреть файл

@ -182,8 +182,6 @@ public:
AddHeadersToChannel(const char *aHeadersData, uint32_t aHeadersDataLen, AddHeadersToChannel(const char *aHeadersData, uint32_t aHeadersDataLen,
nsIChannel *aGenericChannel); nsIChannel *aGenericChannel);
static nsresult GetPluginTempDir(nsIFile **aDir);
// Helper that checks if a type is whitelisted in plugin.allowed_types. // Helper that checks if a type is whitelisted in plugin.allowed_types.
// Always returns true if plugin.allowed_types is not set // Always returns true if plugin.allowed_types is not set
static bool IsTypeWhitelisted(const char *aType); static bool IsTypeWhitelisted(const char *aType);