mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Bug 45699 - Load plugins from profiles directory. r=peterl/sr=roc+moz/a=asa
This commit is contained in:
parent
200dab5fc2
commit
b82f5db31e
@ -76,6 +76,7 @@
|
||||
|
||||
// Locally defined keys used by nsAppDirectoryEnumerator
|
||||
#define NS_ENV_PLUGINS_DIR "EnvPlugins" // env var MOZ_PLUGIN_PATH
|
||||
#define NS_USER_PLUGINS_DIR "UserPlugins"
|
||||
|
||||
#if XP_MAC
|
||||
#define DEFAULTS_DIR_NAME "Defaults"
|
||||
@ -191,6 +192,12 @@ nsAppFileLocationProvider::GetFile(const char *prop, PRBool *persistant, nsIFile
|
||||
if (pathVar)
|
||||
rv = NS_NewLocalFile(pathVar, PR_TRUE, getter_AddRefs(localFile));
|
||||
}
|
||||
else if (nsCRT::strcmp(prop, NS_USER_PLUGINS_DIR) == 0)
|
||||
{
|
||||
rv = GetProductDirectory(getter_AddRefs(localFile));
|
||||
if (NS_SUCCEEDED(rv))
|
||||
rv = localFile->AppendRelativePath(PLUGINS_DIR_NAME);
|
||||
}
|
||||
else if (nsCRT::strcmp(prop, NS_APP_SEARCH_DIR) == 0)
|
||||
{
|
||||
rv = CloneMozBinDirectory(getter_AddRefs(localFile));
|
||||
@ -432,7 +439,7 @@ nsAppFileLocationProvider::GetFiles(const char *prop, nsISimpleEnumerator **_ret
|
||||
#ifdef XP_MAC
|
||||
static const char* keys[] = { NS_APP_PLUGINS_DIR };
|
||||
#else
|
||||
static const char* keys[] = { NS_ENV_PLUGINS_DIR, NS_APP_PLUGINS_DIR };
|
||||
static const char* keys[] = { NS_ENV_PLUGINS_DIR, NS_USER_PLUGINS_DIR, NS_APP_PLUGINS_DIR };
|
||||
#endif
|
||||
|
||||
*_retval = new nsAppDirectoryEnumerator(this, keys, sizeof(keys) / sizeof(keys[0]));
|
||||
|
Loading…
Reference in New Issue
Block a user