From c90cdd2eef8bdc61ebdb9cfc34c27c9256aed4a7 Mon Sep 17 00:00:00 2001 From: Alex Henrie Date: Thu, 19 Feb 2015 12:58:58 -0700 Subject: [PATCH] Bug 1134537 - Only support GIO in nsLocalFileUnix. r=froydnj --- xpcom/io/nsLocalFileUnix.cpp | 33 +++++++-------------------------- 1 file changed, 7 insertions(+), 26 deletions(-) diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp index a4e9a85c2da2..7aaaaca37ecc 100644 --- a/xpcom/io/nsLocalFileUnix.cpp +++ b/xpcom/io/nsLocalFileUnix.cpp @@ -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 giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID); - nsCOMPtr 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 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 giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID); - nsCOMPtr 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 =