diff options
author | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-21 22:05:45 +0000 |
---|---|---|
committer | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-21 22:05:45 +0000 |
commit | b78e168b1640e456e1fc5a1ca8956a4a50c7df94 (patch) | |
tree | cbadab016871c254617ec26ab2d4c6987033b1c4 /webkit/glue | |
parent | a66e24c34a22a4a183b91ad80d74e896a4f4db5f (diff) | |
download | chromium_src-b78e168b1640e456e1fc5a1ca8956a4a50c7df94.zip chromium_src-b78e168b1640e456e1fc5a1ca8956a4a50c7df94.tar.gz chromium_src-b78e168b1640e456e1fc5a1ca8956a4a50c7df94.tar.bz2 |
Update renderer plugin cache when we load/unload extensions with plugins.
BUG=12306
TEST=Load and unload extensions that contain plugins and visit pages that use them. Also covered by tests.
Review URL: http://codereview.chromium.org/201111
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26748 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r-- | webkit/glue/plugins/plugin_list.cc | 9 | ||||
-rw-r--r-- | webkit/glue/plugins/plugin_list.h | 5 |
2 files changed, 12 insertions, 2 deletions
diff --git a/webkit/glue/plugins/plugin_list.cc b/webkit/glue/plugins/plugin_list.cc index 467f68e..338b1f0 100644 --- a/webkit/glue/plugins/plugin_list.cc +++ b/webkit/glue/plugins/plugin_list.cc @@ -39,6 +39,15 @@ void PluginList::AddExtraPluginPath(const FilePath& plugin_path) { extra_plugin_paths_.push_back(plugin_path); } +void PluginList::RemoveExtraPluginPath(const FilePath& plugin_path) { + AutoLock lock(lock_); + std::vector<FilePath>::iterator it = + std::find(extra_plugin_paths_.begin(), extra_plugin_paths_.end(), + plugin_path); + if (it != extra_plugin_paths_.end()) + extra_plugin_paths_.erase(it); +} + void PluginList::AddExtraPluginDir(const FilePath& plugin_dir) { AutoLock lock(lock_); extra_plugin_dirs_.push_back(plugin_dir); diff --git a/webkit/glue/plugins/plugin_list.h b/webkit/glue/plugins/plugin_list.h index 7fc2b58..ddb30cf 100644 --- a/webkit/glue/plugins/plugin_list.h +++ b/webkit/glue/plugins/plugin_list.h @@ -80,9 +80,10 @@ class PluginList { // plugins. void ResetPluginsLoaded(); - // Add an extra plugin to load when we actually do the loading. Must be - // called before the plugins have been loaded. + // Add/Remove an extra plugin to load when we actually do the loading. Must + // be called before the plugins have been loaded. void AddExtraPluginPath(const FilePath& plugin_path); + void RemoveExtraPluginPath(const FilePath& plugin_path); // Same as above, but specifies a directory in which to search for plugins. void AddExtraPluginDir(const FilePath& plugin_dir); |