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

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

Issue 5699005: Policy: Re-enabled plugin still disabled (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Whitespace fixes only. Trybot happiness still applies. Created 9 years, 11 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/plugins/npapi/plugin_list.cc ('k') | webkit/plugins/npapi/plugin_list_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/npapi/plugin_list_mac.mm
diff --git a/webkit/plugins/npapi/plugin_list_mac.mm b/webkit/plugins/npapi/plugin_list_mac.mm
index 62e682b26ac86c9fea68681b401b0ed5e398deeb..802ea3e5e077a20006e3cd4522eb25a451cb1974 100644
--- a/webkit/plugins/npapi/plugin_list_mac.mm
+++ b/webkit/plugins/npapi/plugin_list_mac.mm
@@ -77,29 +77,33 @@ void PluginList::GetPluginDirectories(std::vector<FilePath>* plugin_dirs) {
}
void PluginList::LoadPluginsFromDir(const FilePath &path,
- std::vector<WebPluginInfo>* plugins,
+ ScopedVector<PluginGroup>* plugin_groups,
std::set<FilePath>* visited_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, plugins);
+ LoadPlugin(path, plugin_groups);
visited_plugins->insert(path);
}
}
bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info,
- std::vector<WebPluginInfo>* plugins) {
+ ScopedVector<PluginGroup>* plugin_groups) {
if (IsBlacklistedPlugin(info))
return false;
// 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()) {
- return false; // We already have a loaded plugin higher in the hierarchy.
+ for (size_t i = 0; i < plugin_groups->size(); ++i) {
+ const std::vector<WebPluginInfo>& plugins =
+ (*plugin_groups)[i]->web_plugins_info();
+ for (size_t j = 0; j < plugins.size(); ++j) {
+ if (plugins[j].path.BaseName() == info.path.BaseName()) {
+ return false; // Already have a loaded plugin higher in the hierarchy.
+ }
}
}
« no previous file with comments | « webkit/plugins/npapi/plugin_list.cc ('k') | webkit/plugins/npapi/plugin_list_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698