Mac: Fix compile errors due to revision 284 Chromium update.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@285 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2011-09-10 22:05:55 +00:00
parent d260f78cb2
commit 588a69ed9b
4 changed files with 15 additions and 8 deletions

View File

@ -234,4 +234,4 @@ FileSystemOperation* BrowserFileSystem::GetNewOperation(
dispatcher, base::MessageLoopProxy::current(),
file_system_context_.get(), NULL);
return operation;
}
}

View File

@ -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<webkit::WebPluginInfo> plugins;
webkit::npapi::PluginList::Singleton()->GetPluginInfoArray(
GURL(), type, allow_wildcard, NULL, &plugins, NULL);

View File

@ -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);
}

View File

@ -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<webkit::WebPluginInfo> 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<webkit::WebPluginInfo>::const_iterator it = plugins.begin();
for (; it != plugins.end(); ++it) {
if (webkit::IsPluginEnabled(*it))
return YES;
}
}
return NO;