summaryrefslogtreecommitdiffstats
path: root/webkit/support/webkit_support_glue.cc
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-19 18:14:18 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-19 18:14:18 +0000
commitae4da5152e5c30ce4bc9e9e49f6c4680be9bdbd1 (patch)
tree9243c48236c2b8206ed2cbb9ab5446db2064bd29 /webkit/support/webkit_support_glue.cc
parent11b9a3cbf62c104133f7f1f56dfe51fc65b0a205 (diff)
downloadchromium_src-ae4da5152e5c30ce4bc9e9e49f6c4680be9bdbd1.zip
chromium_src-ae4da5152e5c30ce4bc9e9e49f6c4680be9bdbd1.tar.gz
chromium_src-ae4da5152e5c30ce4bc9e9e49f6c4680be9bdbd1.tar.bz2
Don't load the old layout test plugin in DRT.
This will enable us to switch to using the upstream TestNetscapePlugIn on Windows and Linux. Review URL: http://codereview.chromium.org/5218001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66780 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/support/webkit_support_glue.cc')
-rw-r--r--webkit/support/webkit_support_glue.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/webkit/support/webkit_support_glue.cc b/webkit/support/webkit_support_glue.cc
index ba2d859..739289f 100644
--- a/webkit/support/webkit_support_glue.cc
+++ b/webkit/support/webkit_support_glue.cc
@@ -15,6 +15,23 @@ namespace webkit_glue {
void GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) {
NPAPI::PluginList::Singleton()->GetPlugins(refresh, plugins);
+ // Don't load the forked npapi_layout_test_plugin in DRT, we only
+ // want to use the upstream version TestNetscapePlugIn. We don't need to
+ // blacklist on Mac because DRT Mac already uses the upstream version of
+ // TestNetscapePlugIn.
+ const FilePath::StringType kPluginBlackList[] = {
+ FILE_PATH_LITERAL("npapi_layout_test_plugin.dll"),
+ FILE_PATH_LITERAL("libnpapi_layout_test_plugin.so"),
+ };
+ for (int i = plugins->size() - 1; i >= 0; --i) {
+ WebPluginInfo plugin_info = plugins->at(i);
+ for (size_t j = 0; j < arraysize(kPluginBlackList); ++j) {
+ if (plugin_info.path.BaseName() == FilePath(kPluginBlackList[j])) {
+ NPAPI::PluginList::Singleton()->DisablePlugin(plugin_info.path);
+ plugins->erase(plugins->begin() + i);
+ }
+ }
+ }
}
bool IsDefaultPluginEnabled() {