diff options
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/plugins/plugin_list.cc | 9 | ||||
-rw-r--r-- | webkit/glue/plugins/plugin_list.h | 3 | ||||
-rw-r--r-- | webkit/support/webkit_support.cc | 2 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_webview_delegate.cc | 2 |
4 files changed, 6 insertions, 10 deletions
diff --git a/webkit/glue/plugins/plugin_list.cc b/webkit/glue/plugins/plugin_list.cc index 1ec170c..b40b519 100644 --- a/webkit/glue/plugins/plugin_list.cc +++ b/webkit/glue/plugins/plugin_list.cc @@ -381,13 +381,8 @@ bool PluginList::GetPluginInfo(const GURL& url, std::string* actual_mime_type) { bool found = FindPlugin(mime_type, allow_wildcard, info); if (!found || (info->path.value() == kDefaultPluginLibraryName)) { - WebPluginInfo info2; - if (FindPlugin(url, actual_mime_type, &info2)) { - found = true; - *info = info2; - } else if (FindDisabledPlugin(mime_type, allow_wildcard, &info2)) { - found = false; - } + found = FindPlugin(url, actual_mime_type, info) || + FindDisabledPlugin(mime_type, allow_wildcard, info); } return found; diff --git a/webkit/glue/plugins/plugin_list.h b/webkit/glue/plugins/plugin_list.h index 7187ae2..ce9da28 100644 --- a/webkit/glue/plugins/plugin_list.h +++ b/webkit/glue/plugins/plugin_list.h @@ -125,7 +125,8 @@ class PluginList { // Get all the enabled plugins. void GetEnabledPlugins(bool refresh, std::vector<WebPluginInfo>* plugins); - // Returns true if a plugin is found for the given url and mime type. + // Returns true if a plugin is found for the given url and mime type + // (including disabled plugins, for which |info->enabled| is false). // The mime type which corresponds to the URL is optionally returned // back. // The allow_wildcard parameter controls whether this function returns diff --git a/webkit/support/webkit_support.cc b/webkit/support/webkit_support.cc index 77237cc..f2ff347 100644 --- a/webkit/support/webkit_support.cc +++ b/webkit/support/webkit_support.cc @@ -176,7 +176,7 @@ WebPlugin* CreateWebPlugin(WebFrame* frame, std::string actual_mime_type; if (!NPAPI::PluginList::Singleton()->GetPluginInfo( params.url, params.mimeType.utf8(), kAllowWildcard, &info, - &actual_mime_type)) { + &actual_mime_type) || !info.enabled) { return NULL; } diff --git a/webkit/tools/test_shell/test_webview_delegate.cc b/webkit/tools/test_shell/test_webview_delegate.cc index cb434f4..8c27c3a 100644 --- a/webkit/tools/test_shell/test_webview_delegate.cc +++ b/webkit/tools/test_shell/test_webview_delegate.cc @@ -674,7 +674,7 @@ WebPlugin* TestWebViewDelegate::createPlugin( std::string actual_mime_type; if (!NPAPI::PluginList::Singleton()->GetPluginInfo( params.url, params.mimeType.utf8(), allow_wildcard, &info, - &actual_mime_type)) { + &actual_mime_type) || !info.enabled) { return NULL; } |