Bug 1134537 - Only support GIO in nsLocalFileUnix. r=froydnj

This commit is contained in:
Alex Henrie 2015-02-19 12:58:58 -07:00
Родитель 71f6737b57
Коммит c90cdd2eef
1 изменённых файлов: 7 добавлений и 26 удалений

Просмотреть файл

@ -49,7 +49,6 @@
#ifdef MOZ_WIDGET_GTK
#include "nsIGIOService.h"
#include "nsIGnomeVFSService.h"
#endif
#ifdef MOZ_WIDGET_COCOA
@ -1971,9 +1970,7 @@ nsLocalFile::Reveal()
{
#ifdef MOZ_WIDGET_GTK
nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID);
nsCOMPtr<nsIGnomeVFSService> gnomevfs =
do_GetService(NS_GNOMEVFSSERVICE_CONTRACTID);
if (!giovfs && !gnomevfs) {
if (!giovfs) {
return NS_ERROR_FAILURE;
}
@ -1983,15 +1980,8 @@ nsLocalFile::Reveal()
}
if (isDirectory) {
if (giovfs) {
return giovfs->ShowURIForInput(mPath);
} else
/* Fallback to GnomeVFS */
{
return gnomevfs->ShowURIForInput(mPath);
}
} else if (giovfs &&
NS_SUCCEEDED(giovfs->OrgFreedesktopFileManager1ShowItems(mPath))) {
return giovfs->ShowURIForInput(mPath);
} else if (NS_SUCCEEDED(giovfs->OrgFreedesktopFileManager1ShowItems(mPath))) {
return NS_OK;
} else {
nsCOMPtr<nsIFile> parentDir;
@ -2003,11 +1993,7 @@ nsLocalFile::Reveal()
return NS_ERROR_FAILURE;
}
if (giovfs) {
return giovfs->ShowURIForInput(dirPath);
} else {
return gnomevfs->ShowURIForInput(dirPath);
}
return giovfs->ShowURIForInput(dirPath);
}
#elif defined(MOZ_WIDGET_COCOA)
CFURLRef url;
@ -2027,16 +2013,11 @@ nsLocalFile::Launch()
{
#ifdef MOZ_WIDGET_GTK
nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID);
nsCOMPtr<nsIGnomeVFSService> gnomevfs =
do_GetService(NS_GNOMEVFSSERVICE_CONTRACTID);
if (giovfs) {
return giovfs->ShowURIForInput(mPath);
} else if (gnomevfs) {
/* GnomeVFS fallback */
return gnomevfs->ShowURIForInput(mPath);
if (!giovfs) {
return NS_ERROR_FAILURE;
}
return NS_ERROR_FAILURE;
return giovfs->ShowURIForInput(mPath);
#elif defined(MOZ_ENABLE_CONTENTACTION)
QUrl uri = QUrl::fromLocalFile(QString::fromUtf8(mPath.get()));
ContentAction::Action action =