summaryrefslogtreecommitdiffstats
path: root/chrome/browser/plugin_service.cc
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-27 01:20:55 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-27 01:20:55 +0000
commit9c49ff0c7cf23ef7cfb387da70764a047af8f642 (patch)
treef19f090afe6e55bcb23609969cbfba3e09bdebcb /chrome/browser/plugin_service.cc
parentb9ab60e1fe74db384831e3989cfa200ee5dfbc3f (diff)
downloadchromium_src-9c49ff0c7cf23ef7cfb387da70764a047af8f642.zip
chromium_src-9c49ff0c7cf23ef7cfb387da70764a047af8f642.tar.gz
chromium_src-9c49ff0c7cf23ef7cfb387da70764a047af8f642.tar.bz2
linux: also load plugins from ~/.config/google-chrome/Plugins
This matches Mozilla, which uses ~/.mozilla/plugins. BUG=22261 TEST=watch an strace, see that it hits the appropriate dir when loading plugins Review URL: http://codereview.chromium.org/553102 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37201 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/plugin_service.cc')
-rw-r--r--chrome/browser/plugin_service.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/chrome/browser/plugin_service.cc b/chrome/browser/plugin_service.cc
index 9c75d5c..987d68e 100644
--- a/chrome/browser/plugin_service.cc
+++ b/chrome/browser/plugin_service.cc
@@ -7,6 +7,7 @@
#include "chrome/browser/plugin_service.h"
#include "base/command_line.h"
+#include "base/path_service.h"
#include "base/string_util.h"
#include "base/thread.h"
#include "base/waitable_event.h"
@@ -17,6 +18,7 @@
#include "chrome/browser/plugin_process_host.h"
#include "chrome/browser/renderer_host/render_process_host.h"
#include "chrome/common/chrome_plugin_lib.h"
+#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/gpu_plugin.h"
@@ -88,6 +90,14 @@ PluginService::PluginService()
hklm_event_.reset(new base::WaitableEvent(hklm_key_.watch_event()));
hklm_watcher_.StartWatching(hklm_event_.get(), this);
}
+#elif defined(OS_POSIX) && !defined(OS_MACOSX)
+ // Also find plugins in a user-specific plugins dir,
+ // e.g. ~/.config/chromium/Plugins.
+ FilePath user_data_dir;
+ if (PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) {
+ NPAPI::PluginList::Singleton()->AddExtraPluginDir(
+ user_data_dir.Append("Plugins"));
+ }
#endif
registrar_.Add(this, NotificationType::EXTENSION_LOADED,