Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Unified Diff: webkit/glue/plugins/plugin_list_mac.mm

Issue 164305: Ensure we don't load plugins on the IO thread (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/glue/plugins/plugin_list_linux.cc ('k') | webkit/glue/plugins/plugin_list_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/plugins/plugin_list_mac.mm
===================================================================
--- webkit/glue/plugins/plugin_list_mac.mm (revision 23449)
+++ webkit/glue/plugins/plugin_list_mac.mm (working copy)
@@ -56,17 +56,19 @@
GetPluginPrivateDirectory(plugin_dirs);
}
-void PluginList::LoadPluginsFromDir(const FilePath &path) {
+void PluginList::LoadPluginsFromDir(const FilePath &path,
+ std::vector<WebPluginInfo>* plugins) {
file_util::FileEnumerator enumerator(path,
false, // not recursive
file_util::FileEnumerator::DIRECTORIES);
for (FilePath path = enumerator.Next(); !path.value().empty();
path = enumerator.Next()) {
- LoadPlugin(path);
+ LoadPlugin(path, plugins);
}
}
-bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info) {
+bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info,
+ std::vector<WebPluginInfo>* plugins) {
// The Gears plugin is Safari-specific, and causes crashes, so don't load it.
for (std::vector<WebPluginMimeType>::const_iterator i =
info.mime_types.begin(); i != info.mime_types.end(); ++i) {
@@ -87,8 +89,8 @@
// Hierarchy check
// (we're loading plugins hierarchically from Library folders, so plugins we
// encounter earlier must override plugins we encounter later)
- for (size_t i = 0; i < plugins_.size(); ++i) {
- if (plugins_[i].path.BaseName() == info.path.BaseName()) {
+ for (size_t i = 0; i < plugins->size(); ++i) {
+ if ((*plugins)[i].path.BaseName() == info.path.BaseName()) {
return false; // We already have a loaded plugin higher in the hierarchy.
}
}
@@ -96,7 +98,7 @@
return true;
}
-void PluginList::LoadInternalPlugins() {
+void PluginList::LoadInternalPlugins(std::vector<WebPluginInfo>* plugins) {
// none for now
}
« no previous file with comments | « webkit/glue/plugins/plugin_list_linux.cc ('k') | webkit/glue/plugins/plugin_list_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698