summaryrefslogtreecommitdiffstats
path: root/chrome/browser/plugins
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-17 19:42:59 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-17 19:42:59 +0000
commit477675fedc5411d3d45a3364a767645e20e83e2e (patch)
tree24cc7a07a788023a9b75cc4be3b2030d452e5142 /chrome/browser/plugins
parenta96bf45a782b79a352cedd18055f2dd0e391d7fb (diff)
downloadchromium_src-477675fedc5411d3d45a3364a767645e20e83e2e.zip
chromium_src-477675fedc5411d3d45a3364a767645e20e83e2e.tar.gz
chromium_src-477675fedc5411d3d45a3364a767645e20e83e2e.tar.bz2
Remove last non-tests usage of PluginList from chrome. I could have exposed the used method through the content API, however the usage here was trivial and didn't need to check for wildcards etc so it was just a trivial looping around a vector.
This is in preparation for moving webkit/plugins to content/. BUG=237249 R=scottmg@chromium.org Review URL: https://codereview.chromium.org/19636006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212110 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/plugins')
-rw-r--r--chrome/browser/plugins/plugin_metadata.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/chrome/browser/plugins/plugin_metadata.cc b/chrome/browser/plugins/plugin_metadata.cc
index 8bd4a8b..ce64531 100644
--- a/chrome/browser/plugins/plugin_metadata.cc
+++ b/chrome/browser/plugins/plugin_metadata.cc
@@ -8,7 +8,6 @@
#include "base/logging.h"
#include "base/strings/string_util.h"
-#include "webkit/plugins/npapi/plugin_list.h"
#include "webkit/plugins/npapi/plugin_utils.h"
#include "webkit/plugins/webplugininfo.h"
@@ -61,12 +60,15 @@ bool PluginMetadata::HasMimeType(const std::string& mime_type) const {
}
bool PluginMetadata::MatchesPlugin(const webkit::WebPluginInfo& plugin) {
- using webkit::npapi::PluginList;
-
for (size_t i = 0; i < matching_mime_types_.size(); ++i) {
// To have a match, every one of the |matching_mime_types_|
// must be handled by the plug-in.
- if (!PluginList::SupportsType(plugin, matching_mime_types_[i], false))
+ size_t j = 0;
+ for (; j < plugin.mime_types.size(); ++j) {
+ if (plugin.mime_types[j].mime_type == matching_mime_types_[i])
+ break;
+ }
+ if (j == plugin.mime_types.size())
return false;
}