diff --git a/libcef/browser_file_system.cc b/libcef/browser_file_system.cc index 5d4563f44..025894c58 100644 --- a/libcef/browser_file_system.cc +++ b/libcef/browser_file_system.cc @@ -234,4 +234,4 @@ FileSystemOperation* BrowserFileSystem::GetNewOperation( dispatcher, base::MessageLoopProxy::current(), file_system_context_.get(), NULL); return operation; -} \ No newline at end of file +} diff --git a/libcef/browser_webkit_glue.cc b/libcef/browser_webkit_glue.cc index 2283b9e0d..f371f1671 100644 --- a/libcef/browser_webkit_glue.cc +++ b/libcef/browser_webkit_glue.cc @@ -171,7 +171,7 @@ bool ShouldDownload(const std::string& content_disposition, return false; // Finally, check the plugin list. - bool allow_wildcard = true; + bool allow_wildcard = false; std::vector plugins; webkit::npapi::PluginList::Singleton()->GetPluginInfoArray( GURL(), type, allow_wildcard, NULL, &plugins, NULL); diff --git a/libcef/web_drag_source_mac.mm b/libcef/web_drag_source_mac.mm index 56479d6a7..2d3856d43 100644 --- a/libcef/web_drag_source_mac.mm +++ b/libcef/web_drag_source_mac.mm @@ -65,7 +65,7 @@ FilePath GetFileNameFromDragData(const WebDropData& drop_data) { if (file_name.empty()) { // Retrieve the name from the URL. string16 suggested_filename = - net::GetSuggestedFilename(drop_data.url, "", "", "", string16()); + net::GetSuggestedFilename(drop_data.url, "", "", "", "", string16()); file_name = FilePathFromFilename(suggested_filename); } diff --git a/libcef/web_drag_utils_mac.mm b/libcef/web_drag_utils_mac.mm index 3565f624f..39889afe5 100644 --- a/libcef/web_drag_utils_mac.mm +++ b/libcef/web_drag_utils_mac.mm @@ -78,11 +78,18 @@ static BOOL IsSupportedFileURL(const GURL& url) { return YES; // Check whether there is a plugin that supports the mime type. (e.g. PDF) - webkit::npapi::PluginList* list = webkit::npapi::PluginList::Singleton(); - webkit::npapi::WebPluginInfo info; - if (list->PluginsLoaded() && - list->GetPluginInfo(GURL(), mime_type, false, &info, NULL)) { - return webkit::npapi::IsPluginEnabled(info); + bool allow_wildcard = false; + std::vector plugins; + webkit::npapi::PluginList::Singleton()->GetPluginInfoArray( + GURL(), mime_type, allow_wildcard, NULL, &plugins, NULL); + + // If any associated plugins exist and are enabled don't allow the download. + if (!plugins.empty()) { + std::vector::const_iterator it = plugins.begin(); + for (; it != plugins.end(); ++it) { + if (webkit::IsPluginEnabled(*it)) + return YES; + } } return NO;